things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002
to it. Now there are no more offsets and no copying of code into the
stack. We just redirect directly to entry points in m_syscalls.S.
This will mess up pointercheck, since the redirect targets are now in
Valgrind's address space, not the client's. But pointercheck is hosed
anyway, and I'd rather back off to something simple whilst ppc32 is
stabilised. When the address space management stuff is overhauled
then pointercheck may or may not get reinstated, and if it does then
the trampoline stuff will need revisiting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3977
Plenty still to do, but simple programs like ls seem to run ok
Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969
- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.
- Managed to finally remove core.h and tool.h, double hurrah!
- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.
- Lots of little cleanups and changes related to the above.
- I even did a small amount of documentation updating.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
certain this was the right thing to do, but that stuff sure as hell
didn't fit in any of the existing modules.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3929
As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages. This is good since we actually want the "VG_(foo)" form used
in these messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842
relying on any other modules -- in m_libcbase.
Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.
Also removed VG_(atoll16) and VG_(toupper), which weren't being used.
Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)
Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3838
for the various core modules and use a single global setting so that
the flags are actually consistent everywhere.
Also get rid of most the USE_PIE blocks in the makefiles by having
configure pass expand a variable in the new global AM_CFLAGS to one
of "-fpie" or "" depending on whether PIE is in use.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3760
into a new module m_tooliface. Pretty straightforward. Touches a lot
of files because many files use this interface and so need to include
the headers for the new module.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3652
in response to a mixed-units (bytes and words) error we had involving
VGA_STACK_REDZONE_SIZE (which is now VGA_STACK_REDZONE_SZB).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3639
- Got rid of SET_THREAD_REG and some of the related macros, hallelujah.
Replaced SET_SYSCALL_RETVAL with VGP_TRACK_SYSCALL_RETVAL, which avoids
the redundant resetting of the syscall's return value. The other
remaining two related macros, SET_CLREQ_RETVAL and SET_CLCALL_RETVAL, were
able to be moved to vg_scheduler.c rather than being global, hoorah.
- Passed the required syscall args to VG_(do_sys_sigaltstack)(), rather than
grabbing them from within, removing its reliance on SYSCALL_ARG[12].
It also makes the VG_(do_sys_sig*)() functions more consistent.
- As a result of these changes, was able to remove the SYSCALL_NUM,
SYSCALL_RET and SYSCALL_ARG[123456] macros, yay.
- Replaced the implementations of VG_(set_return_from_syscall_shadow)() and
VG_(get_exit_status_shadow)() with shorter ones that avoid using arch-state
offsets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3630
and to avoid trashing the red zone while delivering a signal on the main
stack on amd64 systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3628
contains what was previously vg_memory.c and also vg_procselfmaps.c,
which is really just a helper for the address space manager.
This just moves code around and modularises it a bit. It doesn't yet
resolve the circular dependencies between ASpaceMgr and various other
chunks of functionality (vg_malloc2, vg_symtab2).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3564
signal frames. This commit looks worse than it is -- really just a
load of moving-code-around.
This is the first multiple-implementation module, in that it has a
single interface (pub_core_sigframe.h) but multiple implementations,
depending on the os-cpu pair. All the grotty details are hidden in
the implementation in m_sigframe/; callers need be aware only of the
interface. Yay.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3556