515 Commits

Author SHA1 Message Date
Tom Hughes
0075b20e84 Add support for linux key management system calls.
Based on patch from Ezra Peisach <epeisach@bu.edu>.
Fixes bug #139300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6632
2007-03-07 11:12:13 +00:00
Tom Hughes
4c402c0681 Add support for some I2C ioctls.
Based on patch from Jean Delvare <khali@linux-fr.org>.
Fixes bug #142186.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6631
2007-03-07 10:07:13 +00:00
Tom Hughes
cbb98bc70d Handle some additional ptrace reason codes. Based on a patch
from Magnus Vesterlund <magnus_vesterlund@hotmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6630
2007-03-07 09:48:32 +00:00
Julian Seward
0a28307fca VG_(addToXA): return index in the array where the item was added.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6619
2007-02-27 16:40:53 +00:00
Julian Seward
b7302d9258 Get rid of the type XArrayStrings in m_clientstate and use new generic
equivalents in module m_xarray instead.  A suprisingly pervasive
change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6616
2007-02-25 15:08:24 +00:00
Julian Seward
e34b7496c6 Make all the m_xarray functions tool-visible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6615
2007-02-25 15:04:40 +00:00
Julian Seward
0dfa208588 Essentially non-functional tidyings and improvements to debuginfo
reading.  Two sets of changes:

* New flags for debugging the readers.  
  --debug-dump=syms
  --debug-dump=line
  --debug-dump=frames

  These (currently accepted but nonfunctional) are intended to
  create output in the style of (that is, identical to)
    /usr/bin/readelf --syms
    /usr/bin/readelf --debug-dump=line
    /usr/bin/readelf --debug-dump=frames
  respectively.  The plan is that flaws in these readers can then
  be easily found by diff-ing the output against that from readelf.

  Also, a new flag --trace-symtab-patt=<object filename pattern>
  which is used to limit all debuginfo-related debug info to the
  set of shared object names matching the given pattern.  This
  facilitates extracting the debuginfo details of one specific
  shared object, which is usually what is required, rather than
  having to wade through megabytes of junk from every object in
  the process.

* Propagate the avma/svma/image address-naming scheme
  (as described at the top of debuginfo.c) through large parts of
  readelf.c and readdwarf.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6588
2007-02-12 17:47:14 +00:00
Julian Seward
9943647c57 Unbreak aix build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6578
2007-02-09 02:11:06 +00:00
Julian Seward
ae7b3f3305 Make VG_(clo_log_file_qualifier) tool-visible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6571
2007-02-07 19:50:55 +00:00
Nicholas Nethercote
1c8e6c7021 s/IRBB/IRSB/
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6570
2007-02-05 23:23:55 +00:00
Dirk Mueller
ac2bbadda5 implement support for AT_FDCWD in openat()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6566
2007-01-31 23:06:08 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
37c3d2ead6 Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6459
2006-12-30 17:45:08 +00:00
Julian Seward
10c505c003 Get rid of the core-tool events pre_mutex_lock, post_mutex_lock and
post_mutex_unlock.  The core can't detect them anyway any more, so
there's no point in having them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6456
2006-12-28 20:26:08 +00:00
Nicholas Nethercote
cadc28816d Split the thread_runstate event into two, start_client_code and
stop_client_code, which is a bit clearer and easier to work with.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6418
2006-12-24 07:51:17 +00:00
Julian Seward
1083ded7e2 Non-functional commit: track IR renaming in vex r1689.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6416
2006-12-24 02:24:11 +00:00
Julian Seward
806c8b17b3 Change the core-tool interface 'thread_run' event to be more useful:
- Rename the event to 'thread_runstate'.

- Add arguments: pass also a boolean indicating whether the thread
  is running or stopping, and a 64-bit int showing how many blocks
  overall have run, so tools can make a rough estimate of workload.

  The boolean allows tools to see threads starting and stopping.
  Prior to this, de-schedule events were invisible to tools.

- Call the callback (hand the event to tools) just before client
  code is run, and again immediately after it stops running.  This
  should give correct sequencing w.r.t posting of thread creation/
  destruction events.

In order to make callgrind work without complex changes, I added a
simple impedance-matching function 'clg_thread_runstate_callback' 
which hands thread-run events onwards to CLG_(thread_run).

Use this new 'thread_runstate' with care: it will be called before
and after every translation, which means it will be called ~500k
times in a startup of firefox.  So the callback needs to be fast.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6413
2006-12-23 01:21:12 +00:00
Tom Hughes
141bfac9cf Add support for some USB ioctls. Based on patches from Jon Burgess and
Marcus Meissner in bugs #136059 and #138896.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6411
2006-12-18 16:48:10 +00:00
Tom Hughes
69c8af5179 Improve prctl support - based on patch from Eric Pouech in bug #138627.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6410
2006-12-18 15:22:46 +00:00
Nicholas Nethercote
52dfe4cb39 Remove defunct constant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6401
2006-12-15 04:37:25 +00:00
Nicholas Nethercote
21dee9ebc3 Make VG_STREQ return True or False, rather than any integer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6400
2006-12-14 03:29:18 +00:00
Julian Seward
99eb8260a2 Get rid of the use of explicit register variables in the ppc32-linux
magic macros.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6386
2006-12-08 21:29:46 +00:00
Nicholas Nethercote
688b71e4a1 Clarify NON_SIMD_CALL instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6362
2006-11-20 22:02:40 +00:00
Dirk Mueller
6662c989dc change void* to Addr in mutex helpers. patch by Bard Van Assche.
I've bumped the tool interface version because it seems binary
incompatible.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6350
2006-11-14 14:32:46 +00:00
Julian Seward
fb8234c9d4 Move a couple of functions out of tool view.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6324
2006-10-19 17:31:37 +00:00
Julian Seward
68475a1dc5 Fix bug in memcheck's instrumenter introduced in r6319. Big comment
in the code explains it.  Sigh.  Why can't anything be simple?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6322
2006-10-19 13:22:16 +00:00
Nicholas Nethercote
fad24de4bc Move VG_BUGS_TO to pub_tool_basics.h so that Nulgrind need not import
pub_tool_libcassert.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6320
2006-10-18 21:50:26 +00:00
Julian Seward
221b8e09c3 Fix installation of includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6317
2006-10-18 01:16:57 +00:00
Julian Seward
77e2257371 Update 'expected' default translation size (partial merge of r6214).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6301
2006-10-17 02:25:50 +00:00
Julian Seward
55f1835953 Change authorship.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6293
2006-10-17 02:11:55 +00:00
Julian Seward
96e9302ca8 Merge r6133:
Inline stackPush and stackPop and placate gcc's resulting concerns
about uninitialised variables.

and also change ownership.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6270
2006-10-17 01:40:33 +00:00
Julian Seward
ecb2ce6536 Merge r6132:
Minor changes for redirection on AIX.  The only significant change is
that it now checks for, warns about and disallows, attempts to
redirect to, or wrap with, a function for which no TOC pointer can be
found, since that would be really asking for trouble (a segfault).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6269
2006-10-17 01:39:30 +00:00
Julian Seward
e10473fe67 Merge r6131:
Change the SysRes type so as to represent both the error value and the
non-error result at the same time.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6268
2006-10-17 01:38:48 +00:00
Julian Seward
49a9f8d4f9 Merge r6130:
- AIX implementations of various stuff, nothing surprising.

- For all platforms: make VG_(read) and VG_(write) return (negative)
  actual error values rather than producing -1 for all failures.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6267
2006-10-17 01:38:13 +00:00
Julian Seward
0a0e94fb63 Merge r6128:
Interface changes for m_debuginfo:
- new fn VG_(di_aix5_notify_segchange) to notify XCOFF loads/unloads
- new fn VG_(lookup_symbol_SLOW) for looking up the address of a fn
  given its name and soname



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6265
2006-10-17 01:36:37 +00:00
Julian Seward
49398acb25 Merge r6127: Extend for AIX5. Nothing surprising here.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6264
2006-10-17 01:35:58 +00:00
Julian Seward
44fb84cd6e Merge r6125: Function-wrapping macros and associated stuff, for AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6262
2006-10-17 01:32:48 +00:00
Julian Seward
8883c3c066 Merge r6119:
Changes to this interface to facilitate actions needed by AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6258
2006-10-17 01:30:07 +00:00
Julian Seward
39c5df84e3 Merge r6092 and some of r6093:
AIX5 kernel-interface stuff.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6245
2006-10-17 01:04:15 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
676afab8a5 Minor comment mods.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6238
2006-10-15 13:47:43 +00:00
Julian Seward
4e2a6f2ccb Add further comments about the tool instrument function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6237
2006-10-15 13:46:18 +00:00
Julian Seward
86b7021db6 Add proper comments explaining the args for the tool instrumenation
function.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6236
2006-10-15 12:48:18 +00:00
Julian Seward
f4560d1332 Move functions which deal with bad command line options from m_main
into m_options.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6233
2006-10-15 01:25:13 +00:00
Nicholas Nethercote
8dcab83d89 Move VG_BUGS_TO to pub_tool_basics.h so that Nulgrind need not import
pub_tool_libcassert.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6231
2006-10-14 23:26:21 +00:00
Julian Seward
ae8215b3ac Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that.  Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface.  I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly.  This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86.  Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
2006-10-14 19:26:10 +00:00
Julian Seward
4b572a567e Create a new module, m_vkiscnums, and move all the system call numbers
into that.  Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224
2006-10-14 15:51:32 +00:00
Julian Seward
a81be9f483 A memory pool update from Graydon Hoare.
Here's an update to the mempool move / change client requests and sanity 
checking. The following changes are present:

   - Added one more (hopefully last) client request, a predicate to
     test whether a mempool anchor address is currently tracked.
     It turns out mozilla's arena-using code is sufficiently inconsistent
     in its assumptions that it's very difficult to phrase the valgrind
     client-request annotations without this request. Namely: sometime
     arena-init and arena-free operations are assumed to be idempotent.

   - Fixed a very rapid tool-memory leak in the mempool sanity check
     routine. The previous version of the patch I posted would use all
     memory even on my Very Beefy Test Machine within ~15 minutes of
     browsing with firefox.

   - Added a little logging code to print the counts of pools and chunks
     active every ~10000 sanity checks, when running with -v.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6197
2006-10-05 17:59:23 +00:00
Julian Seward
7f29782f67 Make this file a bit more 'gcc -ansi -pedantic' friendly (bug #132722).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6036
2006-08-28 21:13:06 +00:00
Julian Seward
7586467ab5 Add a mempool-trimming client request (Graydon Hoare).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5992
2006-07-28 00:06:37 +00:00