447 Commits

Author SHA1 Message Date
Julian Seward
6cc171e050 Add missing CALL_FN_* macros for ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5758
2006-03-12 16:48:14 +00:00
Julian Seward
fb374bd1f5 Add CALL_FN_* missing cases for ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5754
2006-03-12 13:39:15 +00:00
Julian Seward
c4a8d96725 Complete CALL_FN_W_* wrappers for amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5748
2006-03-11 16:19:14 +00:00
Julian Seward
b0c46d47bd Add missing x86-linux CALL_FN_W_11W macro.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5745
2006-03-11 12:57:41 +00:00
Julian Seward
a701e9d4c4 Add a couple of missing cases. Function wrapping is really ugly :-(
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5734
2006-03-09 19:06:23 +00:00
Julian Seward
7622aee188 Add a missing case.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5656
2006-02-18 21:13:29 +00:00
Julian Seward
aa35c50723 Extend stack-permissions-change fast-case machinery to handle +/- 112,
128, 144 and 160.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5640
2006-02-12 15:42:20 +00:00
Tom Hughes
75b62afc07 Fix typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5639
2006-02-12 08:50:45 +00:00
Tom Hughes
8ff91e6d23 Add missing VKI_ prefixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5636
2006-02-11 16:31:54 +00:00
Tom Hughes
3c2633355f Implement the vm86 and vm86old system calls based on a patch
from Alper Akcan. Fixes bug #118939.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5635
2006-02-11 16:26:46 +00:00
Tom Hughes
8441a53495 Implement a few extra ioctls based on patch from Eric Pouech in bug #120728.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5633
2006-02-11 13:29:09 +00:00
Julian Seward
dd1dbcc10f Synthesise and deliver SIGTRAP to clients when requested to do so by vex.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5617
2006-02-07 20:56:41 +00:00
Julian Seward
72dd07b7ef Change the number of client request args from 4 to 5 as that may
be useful in future.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5603
2006-02-01 14:59:42 +00:00
Julian Seward
332b20ecef Make fn wrapping work again on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5573
2006-01-20 16:46:34 +00:00
Julian Seward
e6ffa0ee09 x86 function wrapping fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5571
2006-01-20 15:46:46 +00:00
Julian Seward
83c10ad5b7 Make amd64 function wrapping work again following recent changes.
Includes expected outputs for wrap8 for the non ppc64-linux case.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5570
2006-01-20 15:17:20 +00:00
Julian Seward
6af183ac21 Changes to make function wrapping work better on ppc64-linux:
- when recording the non-redirected address in guest_NRADDR, also
  snapshot the current R2 value, as that will be needed to run the
  original safely

- As a consequence, the original-function information extracted by
  VALGRIND_GET_ORIG_FN is different on ppc64-linux (2 words) from
  all other platforms (1 word).  So change the type of it from
  void* to a new type OrigFn which can be defined differently for
  each platform.

- Change the CALL_FN_* macros for ppc64-linux to save/restore
  R2 values appropriately.

- ppc64-linux: detect overflow/underflow of the redirect stack
  and bring Valgrind to a halt if this happens

- Update VG_CLREQ_SZB for ppc32/64 (was out of date).





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5569
2006-01-20 14:31:57 +00:00
Julian Seward
f0d678baab These files all speak about instrumentation functions.
Instrumentation functions now take a callback closure structure
(VgCallbackClosure*), so this commit changes the signatures
accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5535
2006-01-17 02:06:39 +00:00
Julian Seward
61c4ef43b3 ppc64-linux function wrapping support (does not work properly)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5529
2006-01-17 01:49:37 +00:00
Julian Seward
5e77fedd75 Fix more ppc64-linux function wrapping and symbol-table bits and pieces.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5523
2006-01-12 21:15:35 +00:00
Julian Seward
f9a9e03c7a Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive.  This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520
2006-01-12 12:32:32 +00:00
Julian Seward
5777709dc1 Comment-only change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5519
2006-01-12 12:29:42 +00:00
Nicholas Nethercote
bf162724b9 Merge in r5435 from COMPVBITS. Also added a note to
docs/internals/performance.txt about it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5438
2005-12-25 06:34:04 +00:00
Nicholas Nethercote
7683c8c703 Fix a nasty 64-bit-uncleanness bug in OSet spotted by Julian -- for fast
comparisons it was only considering the bottom 32-bits of the key.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5427
2005-12-24 03:10:56 +00:00
Julian Seward
d188c6df73 ppc64 ELF allows the 288 bytes below the stack pointer to be accessed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5425
2005-12-23 23:34:51 +00:00
Julian Seward
803a8f2100 Deal with function pointer vs function entry crazyness on ppc64-linux.
Memcheck is done, but any tool which generates IR helper calls will
need to be similarly adulterated.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5418
2005-12-23 02:29:58 +00:00
Nicholas Nethercote
1eb0c46b9f Add comment about log2().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5408
2005-12-22 19:50:45 +00:00
Nicholas Nethercote
1decf7621a Add a destructor function to OSet_Destroy() which can be called for each
node.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5402
2005-12-22 06:20:59 +00:00
Nicholas Nethercote
e1a645cce6 Renamed coregrind.h to pub_core_clreq.h and introduced pub_tool_clreq.h to
be consistent with the module naming scheme.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5398
2005-12-21 20:22:52 +00:00
Nicholas Nethercote
3866282110 Remove all remaining profiling gunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5388
2005-12-19 22:48:39 +00:00
Cerion Armour-Brown
b714685c63 Take ppc64 startup further along the road
- fixed launcher.c to recognise ppc32/64-linux platforms properly
 - lots of assembly fixes to handle func descriptors, toc references, 64bit regs.
 - fixed var types in vki-ppc64-linux

Now gets as far as VG_(translate), but dies from a case of invalid orig_addr.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5299
2005-12-06 19:07:08 +00:00
Nicholas Nethercote
fe3cc3bdf9 Change hp2ps to output .ps files in the same dir that the .hp input files
are in.  This fixes bug #117686.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5287
2005-12-05 20:45:59 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Nicholas Nethercote
7f18ebbc33 comment-only change
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5199
2005-11-18 21:32:18 +00:00
Tom Hughes
2f49a0d567 Removed vki_ntohs definition and the infrastructure that supported
it as it is no longer used.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5164
2005-11-17 12:14:42 +00:00
Tom Hughes
e9b07e443e Move VG_(am_get_filename) to the tool accessible aspacemgr header file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5141
2005-11-16 00:11:14 +00:00
Tom Hughes
39e6ec034f Handle some ALSA ioctls that don't have size or direction hints.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5131
2005-11-14 17:03:54 +00:00
Tom Hughes
09d3b7060d Add named constants for si_code values to replace the magic numbers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5092
2005-11-12 00:13:20 +00:00
Nicholas Nethercote
3035e5abee Cachegrind was aborting if it hit a client request. Now it doesn't.
This fixes #116057, I think.  I added a regtest so it won't regress again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5072
2005-11-10 15:20:37 +00:00
Tom Hughes
fb53b628e2 Do ptrace_setregs in a ppc32 compatible way instead of a ppc64 way.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5052
2005-11-09 08:52:56 +00:00
Julian Seward
5f3a7540c1 Try to fill in ptrace_setregs. Dunno if it's right.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5046
2005-11-08 20:59:14 +00:00
Tom Hughes
db732ea188 Handle the PROT_GROWSDOWN and PROT_GROWSUP mprotect flags properly
which stops glibc falling over when a program requires an executable
stack and glibc has been built to assume that PROT_GROWSDOWN will work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5041
2005-11-08 16:51:55 +00:00
Julian Seward
4050d0bd10 Handle sys_sigaction on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5028
2005-11-07 15:48:31 +00:00
Tom Hughes
48f8c22e44 Get core dumping working again - the architecture specific code that
was in the sigframe module has been moved into the coredump module 
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970
2005-10-31 17:05:21 +00:00
Julian Seward
9432f46e02 rm the skiplist module, as it has been superseded by the AVL-tree
based m_oset module.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4952
2005-10-20 00:09:11 +00:00
Julian Seward
1813e8fdcd Change the core-tool interface so that tools are fully aware of both
the guest extents for the presented translation and also its original
un-redirected guest address.  These changes are needed in particular
to make cachegrind's code cache management work properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4943
2005-10-18 12:04:18 +00:00
Nicholas Nethercote
b32a66a35f augment comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4939
2005-10-16 17:48:09 +00:00
Nicholas Nethercote
6218bef661 Comment-only changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4934
2005-10-15 17:50:02 +00:00
Julian Seward
5740bf2f53 Redo the way cachegrind generates instrumentation code, so that it can
deal with any IR that happens to show up.  This makes it work on ppc32
and should fix occasionally-reported bugs on x86/amd64 where it bombs
due to having to deal with multiple date references in a single
instruction.

The new scheme is based around the idea of a queue of memory events
which are outstanding, in the sense that no IR has yet been generated
to do the relevant helper calls.  The presence of the queue --
currently 16 entries deep -- gives cachegrind more scope for combining
multiple memory references into a single helper function call.  As a
result it runs 3%-5% faster than the previous version, on x86.

This commit also changes the type of the tool interface function
'tool_discard_basic_block_info' and clarifies its meaning.  See
comments in include/pub_tool_tooliface.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4903
2005-10-12 10:09:23 +00:00
Julian Seward
4ce62c9445 If the launcher can't figure out what it's own name is, don't bail
out.  Instead, print a warning message, continue, and cause any
attempt to trace into a child process to fail with ECHILD.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4861
2005-10-04 23:07:33 +00:00