Commit Graph

13 Commits

Author SHA1 Message Date
Nicholas Nethercote
493933b1c6 Arch-abstraction: a nice change that removes the need for ume_entry.S. Instead
of using an assembly hack to find the stack pointer at startup, we find it from
argv.  It's much simpler, avoids linking games, is platform independent, and
works on PPC.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2782
2004-10-18 11:52:17 +00:00
Nicholas Nethercote
6059e23b99 Remove duplicate declaration.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2770
2004-10-14 14:24:55 +00:00
Nicholas Nethercote
7942c92bd6 Some combined cleaning up and arch-abstraction, involving UME and start-up:
- removed some assumptions that arch==x86 in Makefile.am files

- removed ume_arch.h;  moved its contents into ume.h.  There was no need for
  these to be separate.

- moved ume_go.c into an x86/ subdir;  gave it the more meaningful name
  jmp_with_stack.c in the process (the corresponding function also got the name
  change)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2757
2004-10-13 17:55:31 +00:00
Nicholas Nethercote
7440f4def2 Cleaned up ume.h by moving some functions around.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2756
2004-10-13 17:29:01 +00:00
Nicholas Nethercote
1eb570df2c Restructured the as_*() functions so they are simpler and there is no implicit
global state -- the state is threaded explicitly through via function arguments
and return values.  ume.c now has no global variables, which is nice.

Also removed a redundant as_pad() call in stage2's main() which meant
layout_client_space() could be merged with layout_remaining_space().

Also removed a couple of no-longer-used variables and #defines.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2537
2004-07-30 21:50:15 +00:00
Nicholas Nethercote
4421ac53b7 Added some comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2531
2004-07-26 15:43:57 +00:00
Nicholas Nethercote
c4a06df097 Rename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
'interp_args'.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2530
2004-07-26 15:32:47 +00:00
Nicholas Nethercote
7f9a4f8c64 Neaten up ume.h: don't export readelf(), mapelf, and struct elfinfo; improve
formatting too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2529
2004-07-26 15:28:33 +00:00
Jeremy Fitzhardinge
d03690c430 Fix the use of brk. This change removes the requirement for the "real" brk
segment to be moved up to stage2's brk segment.  Instead, Valgrind's
use of brk is simulated with mmap.  In order to prevent any unwanted use
of the process brk segment, it also sets the RLIMIT_DATA to 0, which will
make brk always fail.  glibc's malloc will use mmap to allocate if brk
fails.  We try to intercept glibc's brk, but malloc seems to always use the
library-internal version.  (The client's use of brk has always been simulated,
and is unaffected by this change.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2266
2004-02-24 23:42:55 +00:00
Nicholas Nethercote
aa5c98c53b 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
2004-01-24 18:18:54 +00:00
Dirk Mueller
1df018a591 remove anonymous unions - not supported by older versions of gcc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2188
2004-01-06 16:02:29 +00:00
Julian Seward
9a14969e96 Add copyright notices to new files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2175
2004-01-04 03:46:11 +00:00
Jeremy Fitzhardinge
822231c4b0 Add and delete all the files which need adding and deleting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2119
2003-12-16 02:14:00 +00:00