18 Commits

Author SHA1 Message Date
Julian Seward
c538f32818 Handle a couple of artefacts produced by icc11: DW_TAG_reference_type
that doesn't have a size, and DW_FORM_ref_addr (assuming my
interpretation of the standard is correct.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9058
2009-01-25 23:50:32 +00:00
Julian Seward
c72e27c5b0 Accept 'enum' type DIEs that do not have any names; apparently Dwarf2
allows this.  Patch from Nuno Lopes.  #181707.
MERGE TO 3_4_BRANCH


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9055
2009-01-24 01:44:15 +00:00
Julian Seward
3a786496c1 Handle the case where a Compilation Unit (CU) (or, really, the CU and
its associated DIEs) occupies less space than stated in the CU's
header.  icc9 appears to produce CUs with this anomaly.  Not handling
the case causes the reader to lose sync at the start of the following
CU, since it hasn't skipped the junk bytes at the end of the current
CU, and it is basically hosed after that.
MERGE TO 3_4_BRANCH (?)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9049
2009-01-24 00:04:28 +00:00
Tom Hughes
4ca0c5f735 Don't assume that all global variables are in the data section - we
now cope with variables in the text, data, sdata and bss sections.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9021
2009-01-22 13:40:12 +00:00
Nicholas Nethercote
5ad1dd61f9 Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT;  OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be.  Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959
2009-01-15 21:29:24 +00:00
Julian Seward
e2b15887e6 get_Form_contents: handle DW_FORM_block2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8701
2008-10-23 11:13:05 +00:00
Julian Seward
2db480e222 Tolerate apparently broken Dwarf3 generated by gcc (GCC) 4.4.0
20081017 (experimental): accept DW_TAG_enumerator with only a
DW_AT_name but no DW_AT_const_value.  This is in violation of the
Dwarf3 standard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8700
2008-10-23 10:54:40 +00:00
Julian Seward
2d9f215985 Don't assert on icc9 generated Dwarf3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8696
2008-10-22 15:49:59 +00:00
Julian Seward
335992d8fc Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621
2008-09-18 18:12:50 +00:00
Julian Seward
207c05fd20 Rework storage management in the Dwarf3 type and variable reader, to
try and reduce its space consumption.  This change changes some long
linked lists into XArrays instead.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8540
2008-08-22 23:18:02 +00:00
Julian Seward
4040072a3a Make the absolute bare minimum changes needed to stop the Dwarf3
variable & type reader dying on gcc-4.3.x produced Dwarf3.  This is
done by handling DW_TAG_class_type and treating it the same as
DW_TAG_structure_type.  I don't know if this is really correct or not.

This reader is still grossly inefficient in terms of space use, and
could be majorly improved, by storing information in arrays rather
than in linked lists with (sometimes) more than 5 million elements.
But this will have to wait.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8534
2008-08-20 08:14:07 +00:00
Bart Van Assche
8e96150945 Merged FORMATCHECK branch (r8368) to trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369
2008-07-07 06:49:24 +00:00
Julian Seward
9263da368a Handle apparently-bogus DW_TAG_compilation_unit DIE that shows up in
gcc-4.3 output.  My reading of the DWARF3 standard is that a
DW_TAG_compilation_unit should have either DW_AT_ranges or a
(DW_AT_low_pc, DW_AT_high_pc) pair, but not both.  So I think this is
a gcc bug.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8276
2008-06-24 09:51:55 +00:00
Julian Seward
4cae5c3ed5 Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output.  This
will be fixed.

The core-tool interface is slightly changed.  The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982
2008-05-01 20:24:26 +00:00
Julian Seward
18a72f705c Try to handle the situation where an object is first split into a base
object (without D3 info) and a debuginfo (with D3 info), and then the
base object is prelinked to some nonzero address, but the debuginfo
object is left unchanged.  A nasty and unprincipled hack.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7590
2008-03-07 22:17:31 +00:00
Julian Seward
3f577414fe Handle DW_FORM_data8.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7589
2008-03-07 20:07:58 +00:00
Bart Van Assche
99e2db5631 Compiles now with gcc 2.96 too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7550
2008-03-03 20:40:51 +00:00
Julian Seward
14af4957fc Merge in the DATASYMS branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540
2008-03-03 01:35:41 +00:00