Commit Graph

104 Commits

Author SHA1 Message Date
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
20ce1d0a81 Handle DW_CFA_undefined (produced by PathScale 2.4 on amd64-linux)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6510
2007-01-12 19:21:22 +00:00
Julian Seward
c8bb92ec69 ML_(read_callframe_info_dwarf2): deal better with CIEs with no
augmentation (has to do with read_encoded_Addr).  This "fix" is a
kludge and may be replaced in future by something cleaner.  See
extensive comment addition for the whole sorry tale.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6509
2007-01-12 19:03:19 +00:00
Julian Seward
471585d496 In struct _SegInfo, rename field 'size' to 'text_size' so as to be
consistent with all the other 'foo_start_avma'/'foo_size' pairings.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6508
2007-01-11 21:56:20 +00:00
Julian Seward
1b7dd32e8f In struct _SegInfo, rename field 'offset' to 'text_bias'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6507
2007-01-11 20:11:51 +00:00
Julian Seward
00c15317cc Non-functional change: rename a bunch of variables and field names
that hold various kinds of addresses during debuginfo reading, so as
to make it easier to understand.  See comment at top of debuginfo.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6506
2007-01-11 19:42:11 +00:00
Julian Seward
afb082acc7 Generate valid XML even for very long fn names - always ensure tags
have matching closing tags.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6502
2007-01-10 15:42:15 +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
cf7e9dbc05 CFI reader: when decoding the single (address) argument to
DW_CFA_set_loc, take into account any encoding info conveyed by the
augmentation string.  See big comment in the code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6356
2006-11-16 12:21:52 +00:00
Julian Seward
565fe34ff0 Merge r6129:
Changes to support XCOFF:

- allow modules to have 'member names' as well as file names.  A member
  name is a "foo.o" name inside a "bar.a"; necessary as AIX
  keeps all its dynamic libraries in .a files.

- rename the type RiLoc to DiLoc (this holds a line number indication).
  No idea why it was called RiLoc in the first place.

- trace changes in type SysRes

- implement VG_(di_aix5_notify_segchange)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6266
2006-10-17 01:37:10 +00:00
Julian Seward
5db73d123f Merge r6100:
Code for reading XCOFF32 and XCOFF64 symbol tables and line numbers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6249
2006-10-17 01:07: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
0401e8938b Slacken assertion slightly, and add comments. Fixes #133051
('cfsi->len > 0 && cfsi->len < 2000000' failed)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6040
2006-08-28 22:56:59 +00:00
Tom Hughes
ab63c4397b Use fstat64 to work out the size of a file if it is available as it
copes with a wider range of filesystems than the old fstat call.

Fixes bug #130020.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5979
2006-07-05 17:47:46 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Julian Seward
ddf1056a0e Properly handle external debuginfo (.gnu_debuglink) for stripped and
prelinked libraries (patch from L. David Baron).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5841
2006-04-12 10:08:05 +00:00
Julian Seward
1cebaa9c21 Fold in a patch which appeared in FC5's default valgrind build, which
causes V to ignore more DWARF3 CFA expressions on amd64 and so gets
rid of complaints from the CFA reader.  Why didn't Red Hat push this
patch upstream?  I don't know.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5838
2006-04-08 16:22:53 +00:00
Julian Seward
7636cac62a Avoid compiler warnings on ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5829
2006-04-06 13:31:17 +00:00
Julian Seward
27b95f28a5 Cleanup/restructure m_debuginfo, as described in
coregrind/m_debuginfo/README.txt.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5823
2006-04-04 15:12:44 +00:00
Robert Walsh
7b68d73711 Denestification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5626
2006-02-10 03:33:10 +00:00
Julian Seward
b529b21907 Teach the Dwarf2 line-info reader how to handle so-called 64-bit
Dwarf, which is a (fully documented) Dwarf3 variant in which some
32-bit fields are expanded to 64 bits.  Presumably this is useful for
those vast hordes of folks who regularly build executables or shared
objects more than 4GB long.  For whatever reason, IBM's xlc/xlC/xlf
insist on generating 64-bit Dwarf when compiling even hello-world size
programs for ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5625
2006-02-09 23:35:11 +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
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
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
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
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
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
80e79b5bc5 Read dwarf2 line number information even if a .debug_str section was
not found.  This is believed to fix the regression in 3.1.X wherein
debug info was sometimes not read from icc-8.1 generated executables.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5470
2006-01-01 23:00:49 +00:00
Julian Seward
ea6990403c Tentative fix for #117332: No line numbers printed by Valgrind 3.1.0
for programs compiled with Intel compiler.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5456
2005-12-28 15:19:39 +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
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
Tom Hughes
15300b2f2f Reinstate code to extent SegInfo ranges to cover all PT_LOAD segments
when VG_(needs_data_syms) has been called by the tool.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5140
2005-11-16 00:09:15 +00:00
Tom Hughes
87c289f91d Fix stabs decoder to allow :: in a method name provided it is inside
a template argument list. Fixes bug #113126.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5138
2005-11-16 00:04:58 +00:00
Julian Seward
b7eb35135c On amd64, when running allocation-intensive code in the presence of
many shared objects, finding the relevant CFI information for stack
unwinding becomes a significant performance overhead.  This change
slowly rearranges the SegInfo list to bring more popular entries to
the front during CFI lookup.  This reduces the startup time of
konqueror on memcheck on amd64 from 124 to 110 seconds.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5125
2005-11-14 15:10:12 +00:00
Tom Hughes
06e2ca6cf1 Fix compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5083
2005-11-11 12:30:36 +00:00
Julian Seward
f1ead573e8 Second try at getting rid of the is_self() hack used to decide when to
load debug info from the V executable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5033
2005-11-08 00:45:47 +00:00
Julian Seward
386b6b805a Read debug info from the V exe when it is installed as an in-place
build.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5020
2005-11-05 14:08:35 +00:00
Julian Seward
b7beeca0be Handle SHT_NOBITS sections when checking for section overruns. This
fixes a problem where debug info was sometimes not being read on
ppc32.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4962
2005-10-21 02:37:40 +00:00
Tom Hughes
626b0fbdc3 Don't assert if the DWARF line info reader is given so little data that
it can't even read the length of the block - just report an error as we
do if there isn't enough data for the rest of the block. Fix bug #114757.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4960
2005-10-20 18:38:08 +00:00
Julian Seward
62f6e91ab4 Unfortunately gcc4 doesn't like recently added prototypes. Comment
out for the time being.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4926
2005-10-15 00:58:26 +00:00
Nicholas Nethercote
04d5174fd1 Avoid two compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4921
2005-10-14 13:48:54 +00:00
Tom Hughes
6961dcf591 Fix statement-before-declaration warnings for the core code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4906
2005-10-12 10:45:27 +00:00
Tom Hughes
1b42aba084 Make sure we have all the DWARF2 sections before trying to decode
any DWARF2 debug information. All make sure we don't fall over if
the .debug_info is less than four bytes long. Fixed bug 113642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4856
2005-10-04 16:54:54 +00:00
Julian Seward
f75575351e Clean up the m_debuginfo interface a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4801
2005-09-28 01:23:25 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
63df7df1c8 Give file a better name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4546
2005-08-28 04:48:12 +00:00