Moved stage2.c into vg_main.c.  Merged main() and VG_(main)();  VG_(main)()
no longer exists.  One advantage of this is that global
variables/structures needed for communicating between the two can be made
local.  Also, the order in which things happen has been simplified.

This is mostly just a big refactoring.  Startup is now a fair bit easier to
understand.  Dependencies between the various startup stages are fairly well
documented in comments.  Also, --help and --version now work properly --
eg. --help gives tool-specific help if --tool was specified.  There is still
some parts where things could be reordered and/or simplified, and where the
dependencies aren't clear.  These are marked with 'XXX'.

One new feature was added: ability to read options from ~/.valgrindrc and
./.valgrindrc.  Part of this is support for specifying tool-specific options
in the form --toolname:tool-specific-option.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2222 a5019735-40e9-0310-863c-91ae7b9d1cf9
12 files changed