Commit Graph

2691 Commits

Author SHA1 Message Date
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
Julian Seward
bd737dfeac Make symbol table reading understand the .opd section conventions used
for ppc64-linux on gcc 4.0.0 and above.

As part of this, simplify the FIND macros and rename some fields in
SegInfo to be a bit clearer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5501
2006-01-05 14:11:31 +00:00
Julian Seward
9c0ae4be6f Initial redirect stuff for ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5499
2006-01-05 14:07:04 +00:00
Julian Seward
c70190e6da More syscalls ...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5498
2006-01-04 15:40:16 +00:00
Julian Seward
32f134b8c1 Somewhat rehash the biarch-build machinery so as to (1) formalise the
distinction between primary and secondary build targets, and (2) make
it independent of the default behaviour of gcc (iow, what gcc does
when you specify neither -m32 nor -m64).

As a result, an out-of-the-box build on ppc64-linux now builds a
system which is basically for 64-bit PowerPC, but also has the ability
to run 32-bit ppc-linux binaries (exactly the same arrangement as you
get when building on amd64-linux).

There are various twists and turns.  multiple-architectures.txt is
updated all the gory details.

This will break amd64 builds until such time as
<tool>/tests/{amd64,x86}/Makefile.am are fixed up (shortly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5493
2006-01-04 01:20:28 +00:00
Cerion Armour-Brown
9e96cc2540 Tidy up some ppc64 assembly & comments a little.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5490
2006-01-03 14:28:02 +00:00
Julian Seward
cf20ba8f52 Signal-related syscall support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5485
2006-01-03 04:10:13 +00:00
Julian Seward
d452d6b62d casting paranoia (harmless)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5484
2006-01-03 04:09:27 +00:00
Julian Seward
8a934d6fdd First cut at signal frame build/removal for ppc64-linux. Ghastly
stuff, but it does at least appear to do simple signal stuff
correctly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5483
2006-01-03 04:08:32 +00:00
Julian Seward
e76e55b1f1 Enable various syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5477
2006-01-02 19:06:37 +00:00
Julian Seward
c3ab4db931 Oops, fix interrupted-syscall snafu.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5476
2006-01-02 19:06:08 +00:00
Julian Seward
82a78cd12c Recrystallise the warp core on ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5475
2006-01-02 16:32:10 +00:00