Commit Graph

2702 Commits

Author SHA1 Message Date
Julian Seward
eeb7eaa4e1 Set fpscr back to a known state after running generated code (64-bit mode).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5615
2006-02-06 05:31:37 +00:00
Julian Seward
017ed68f63 Set fpscr back to a known state after running generated code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5614
2006-02-06 05:14:31 +00:00
Julian Seward
4c5b33c685 Followup to r5605: fixes for ppc64
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5606
2006-02-03 19:14:33 +00:00
Julian Seward
5163ea2aed * Track introduction of IR ternary primops and rounding modes, at least as
to the extent needed to make ppc32 work.

* As a result, remove the replacements for glibc's floor/ceil fns on 
  ppc32/64, since vex can now correctly simulate the real ones.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5605
2006-02-03 16:12:27 +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
9045ab4f72 Un-break ppc32 following recent hw-capabilities hackery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5598
2006-01-27 21:52:39 +00:00
Julian Seward
25da9f5432 Track vex r1555 (Change the way Vex represents architecture variants
into something more flexible.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5597
2006-01-27 21:23:23 +00:00
Julian Seward
bd0a65919b Get rid of some will-never-be-used redirections -- names which are in
libstdc++ but which are not (C++) mangled.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5595
2006-01-26 18:04:46 +00:00
Julian Seward
6a00071217 ppc32-linux: enable __NR_statfs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5594
2006-01-26 14:25:51 +00:00
Julian Seward
cb8adb0480 Vex can't simulate floor() or ceil() correctly on ppc32/64 from
glibc-2.3.4 onwards, so just replace the functions with the older
glibc implementation.  This is an ugly kludge.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5591
2006-01-24 01:01:17 +00:00
Julian Seward
da90c31368 Enable message-queue syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5589
2006-01-23 04:34:22 +00:00
Julian Seward
f6738169ca Fix profiling dispatcher.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5587
2006-01-23 00:09:07 +00:00
Julian Seward
03788036db Comment-only changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5586
2006-01-22 20:12:45 +00:00
Julian Seward
488f5569a6 Two unrelated changes:
- create an IMark at the start of the IR for the ppc64 magic return stub
  as cachegrind will barf if it doesn't find one in a BB

- ppc64: for the same reason that _NRADDR is set to zero at the start of
  redirect block which is a function replacement entry (as opposed to a
  function wrapper entry), also set _NRADDR_GPR2 to zero.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5583
2006-01-22 01:15:36 +00:00
Julian Seward
f3f3f2b8ad rm 'inline' - produces too many complaints with -Winline
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5581
2006-01-22 01:10:12 +00:00
Julian Seward
c53cdd12af Handle __NR_madvise.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5577
2006-01-20 21:46:03 +00:00
Julian Seward
0297c5e469 ppc64-linux: compute the correct initial program counter and tocptr
when the interpreter is loaded at a different address than what it
asked for.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5576
2006-01-20 21:45:36 +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
87a0201107 ppc64-linux: apply the bogus-LR kludge in a second place.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5555
2006-01-19 03:47:30 +00:00
Julian Seward
4936ed62d7 Deal with somewhat dubious numbers showing up from the kernel for the
r3 (syscall return) value in the ucontext for a signal interrupting a
syscall.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5554
2006-01-19 03:44:10 +00:00
Julian Seward
296920f25b Rationalise demangling a bit more, so that suppression matching works
properly again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5553
2006-01-19 03:38:19 +00:00
Julian Seward
92ac47d62f Add handy debugging line.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5552
2006-01-19 03:36:52 +00:00
Julian Seward
94e2a571bc More syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5551
2006-01-19 03:36:13 +00:00
Julian Seward
b2250a1adf Consistently call init() before doing any MALLOC_TRACE, since the
latter depends on function pointers obtained by the former.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5550
2006-01-19 03:35:37 +00:00
Julian Seward
8a98207bcf Make VG_(get_StackTrace2) aware of bogus LR values in
replacement/wrapper functions on ppc64-linux, which otherwise mess up
the backtraces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5549
2006-01-18 04:25:20 +00:00
Julian Seward
a9bbc3690b Fix an all-platforms bug introduced by the recent overhaul of function
interception and wrapping.  This was causing failures matching
function names in suppressions to function names in backtraces when
the latter names were Z-encoded (eg malloc), which typically caused
all leak suppressions to fail because they contain names such as
malloc, which are Z-encoded.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5548
2006-01-18 04:23:10 +00:00
Julian Seward
8a00ed8174 To reduce the endless nuisance of multiple different names for "the
frame below main()" screwing up the testsuite, change all known
incarnations of said into a single name, "(below main)".



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5547
2006-01-18 04:20:04 +00:00
Julian Seward
e9d09cb891 Allow more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5544
2006-01-18 04:15:42 +00:00
Julian Seward
f53ef345a0 Make the selection of the default platform a bit more sophisticated,
so it does the right thing on ppc64-linux rigs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5543
2006-01-17 16:41:34 +00:00
Tom Hughes
6c08001d8e Get the core thread modelling code compiling again - uncomment the
code, fix the includes and switch to OSets instead of SkipLists.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5542
2006-01-17 15:09:07 +00:00
Julian Seward
387102d5bc Change the default --trace-notbelow= number from zero to infinity,
effectively, since that's a more useful default.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5539
2006-01-17 02:36:40 +00:00
Julian Seward
5d5a72d1a9 The symbol table reader hides all that dot crazyness on ppc64-linux
now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5538
2006-01-17 02:23:09 +00:00
Julian Seward
2f93c42727 ppc64-linux: set R2 before running __libc_freeres
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5537
2006-01-17 02:22:21 +00:00
Julian Seward
5e2f451da8 More ppc64-linux function replacement/wrapping stuff.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5536
2006-01-17 02:21:09 +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
285cab7087 Add test code for checking that m_debuginfo's tocptr-reading code on
ppc64-linux are working properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5534
2006-01-17 02:02:47 +00:00
Julian Seward
295cb8afea Fix copy-n-paste error.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5533
2006-01-17 01:59:43 +00:00
Julian Seward
032abb3cdf Rewrite VG_(translate) to make it clearer (it had grown like Topsy for
a long time) and to use the new preable-generating callback facility
supported by Vex.  Use this to add support for R2 saving/restoring
needed for function replacement/wrapping on ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5531
2006-01-17 01:57:33 +00:00
Julian Seward
32b3ef00fc Further refine ppc64-linux ELF symbol table reading to try to
establish the toc base value (R2) needed for any given symbol.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5530
2006-01-17 01:54:16 +00:00
Julian Seward
e626b54566 Tidy up ELF symbol table reading a bit. Make a completely new
function for reading ELF symbol tables on ppc64-linux so as to avoid
cluttering up the {x86,amd64,ppc32}-linux cases with convoluted
hoop-jumping needed to handle both the dotful (older) and dotless
(newer) ppc64-linux ABI variants.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5527
2006-01-13 23:12:49 +00:00
Julian Seward
171ac07602 Fix bogus assertions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5526
2006-01-13 13:04:03 +00:00
Tom Hughes
63da307b46 Use VG_(am_mmap_anon_float_valgrind) to allocate the unredirected
translation cache. This ensures that the cache space is executable
which it isn't when it is allocated as a static variable in the data
segment, at least on my amd64 box.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5525
2006-01-13 09:57:01 +00:00
Tom Hughes
fac8b71d11 Decode NOREDIR events properly in debug output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5524
2006-01-13 09:26:23 +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
d8e230f171 Make function wrapping work on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5522
2006-01-12 14:04:46 +00:00
Julian Seward
8576ec23a6 Make function wrapping work on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5521
2006-01-12 13:34:20 +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
Tom Hughes
080cea586c Handle the <<= and >>= operators in stabs. Fixes bug #119914.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5514
2006-01-11 13:16:35 +00:00
Julian Seward
69cd1990e5 Even more ppc64-linux syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5503
2006-01-05 14:13:14 +00:00
Julian Seward
944c6443d6 This is logically part of r5501 (ppc64-linux symbol reading fixes)
but got missed from 5501.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5502
2006-01-05 14:12:53 +00:00