Nicholas Nethercote b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
..
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-05-20 02:11:49 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00
2009-03-10 22:02:09 +00:00

On 4 Apr 06, the debuginfo reader (m_debuginfo) was majorly cleaned up
and restructured.  It has been a bit of a tangle for a while.  The new
structure looks like this:

                  debuginfo.c 
  
                   readelf.c

        readdwarf.c        readstabs.c

                   storage.c

Each .c can only call those below it on the page.

storage.c contains the SegInfo structure and stuff for 
maintaining/searching arrays of symbols, line-numbers, and Dwarf CF 
info records.

readdwarf.c and readstabs.c parse the relevant kind of info and 
call storage.c to store the results.

readelf.c reads ELF format, hands syms directly to storage.c,
then delegates to readdwarf.c/readstabs.c for debug info.  All 
straightforward.

debuginfo.c is the top-level file, and is quite small.

There are 3 goals to this:

(1) Generally tidy up something which needs tidying up

(2) Introduce more modularity, so as to make it easier to add
    readers for other formats, if needed

(3) Simplify the stabs reader.

Rationale for (1) and (2) are obvious.

Re (3), the stabs reader has for a good year contained a sophisticated
and impressive parser for stabs strings, with the aim of recording in 
detail the types of variables (I think) (Jeremy's work).  Unfortunately 
that has caused various segfaults reading stabs info in the past few months
(#77869, #117936, #119914, #120345 and another to do with deeply nested
template types).

The worst thing is that it is the stabs type reader that is crashing,
not the stabs line-number reader, but the type info is only used by
Helgrind, which is looking pretty dead at the moment.  So I have lifed
out the type-reader code and put it in UNUSED_STABS.txt for safe
storage, just leaving the line-number reader in place.

If Helgrind ever does come back to life we will need to reinstate the
type storage/reader stuff but with DWARF as its primary target.
Placing the existing stabs type-reader in hibernation improves
stability whilst retaining the development effort/expertise that went
into it for possible future reinstatement.