Commit Graph

83 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
3abe14bc49 Only show the "line number too large" warning once.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4511
2005-08-25 00:20:56 +00:00
Nicholas Nethercote
81903d273f Compactify unload_symbols().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4403
2005-08-14 04:29:12 +00:00
Tom Hughes
5636f53a8c If the pre-handler for the execve system call fails to state the file
being executed then propagate the error from the stat instead of just
return ENOACCES all the time. Fixes bug #110208.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4330
2005-08-05 07:46:32 +00:00
Julian Seward
ec3da192ee Don't show CFI reader warnings without -v. This is intended to hide
Warning: zero-sized CIE/FDE but not at section end in DWARF2 CFI reading

which I know is not a good fix, but I don't want to get into messing
with the CFI reader this close to 3.0, and the appearance of this
message causes many regtests to fail on some systems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4299
2005-08-01 14:12:17 +00:00
Tom Hughes
011cbec76a A static const variable must have a constant initialiser, so remove the
static qualifier from those variables with a non-constant initialiser.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4294
2005-07-29 18:33:19 +00:00
Julian Seward
0f4a5064dd Replace a bunch of useless memory-to-memory copies with some highly
predictable branches.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4233
2005-07-23 17:45:15 +00:00
Julian Seward
7f196f23c4 When canonicalising CFI information, truncate overlapping address
ranges and remove zero-length entries.  If these appear it's because
the generating compiler has created invalid CFI info.  Nevertheless we
should handle this robustly.  This fixes a bug reported by Bill
Hoover.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4232
2005-07-23 17:14:03 +00:00
Julian Seward
6789f6542e A commit which is almost all trivial change.
- m_main: if --log-file-qualifier applies, do not add ".pid"
  at the end of the name

- Fix the logic which detected whether the just-devised name
  already existed.  This was broken (by me) because it could not
  distinguish the reasons for failing to open the logfile.

  Doing this required changing the return type of VG_(open)
  from Int to SysRes (to make failure reasons visible) and 
  that's the cause of most of the changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4228
2005-07-23 09:18:34 +00:00
Nicholas Nethercote
3816fc83da Re-institute SegInfo reference counting and deallocation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4225
2005-07-21 23:26:25 +00:00
Tom Hughes
c3e2f37aa6 Allow negative sizes for structure members in stabs. Fixed bug #109385.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4221
2005-07-21 11:49:24 +00:00
Tom Hughes
f8e2de1c61 Handle a 'd' stab that indicates a file in pascal. Fixes bug #89914.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4220
2005-07-20 17:48:18 +00:00
Tom Hughes
e1f2161fe1 Handle stabs builtin type -30 (wide characters, 16 bit unsigned).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4218
2005-07-20 13:56:22 +00:00
Julian Seward
f13ea11bf8 Clean up endianness macros a bit. Now pub_tool_basics.h defines
VG_LITTLEENDIAN or VG_BIGENDIAN and that's what should be used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4142
2005-07-10 00:53:42 +00:00
Nicholas Nethercote
fdeaecb9e1 Rename VG_(get_obj)() as VG_(find_seginfo) to be more consistent
with the other function names.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4114
2005-07-06 13:19:11 +00:00
Julian Seward
71677bc130 acroread-5.06 for x86-linux requires up to 598 CIEs. Bump the array
size accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4058
2005-06-30 00:22:38 +00:00
Julian Seward
2a0a78dffe A couple more XML cases that slipped through the net.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4056
2005-06-30 00:10:16 +00:00
Nicholas Nethercote
f87b53e9d9 Don't include headers from headers -- make inclusions explicit in all C
files.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4031
2005-06-26 14:48:23 +00:00
Nicholas Nethercote
c8f13ea9d3 Cleaned up m_redir.c: renamed some variables and functions, added some
comments, neatened the debugging output, avoided unexpected side-effects
in functions, tweaked code to make it clearer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4028
2005-06-26 04:49:25 +00:00
Nicholas Nethercote
cc404a9c03 If read_lib_symbols() fails, once again discard the SegInfo.
And some other minor cleanups.






git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4027
2005-06-26 02:19:17 +00:00
Nicholas Nethercote
e7aa6b03de Made m_debuginfo not depend on m_aspacemgr, breaking the direct circular
dependence between them.  (There's still an indirect one via m_libcmman.)

As a result, I was able to move the Segment type declaration into
pub_core_aspacemgr.h, which is a much better spot.  I was also able to
remove a couple of #includes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4025
2005-06-25 20:49:33 +00:00
Nicholas Nethercote
4b4e694fef Avoid m_redir.c importing priv_symtab.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4024
2005-06-25 20:22:43 +00:00