- one declarations from core.h removed, one moved to within m_syscalls.
- all the x86 LDT stuff made local to m_syscalls. x86-linux/ldt.c removed
as a result. x86/state.c slimmed down, too. x86/x86_private.h removed
too.
- all the AMD64 LDT stuff was deleted, since it was all commented out. It
can be added back in later in the appropriate places if necessary.
Thus amd64-linux/ldt.c and amd64/amd64_private.h were removed.
- other minor naming changes
I hope I didn't break AMD64 compilation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3726
required moving a lot of stuff around. I deleted
VG_(set_return_from_syscall_shadow)() and VG_(get_exit_status_shadow)(),
which screwed up the modularity and weren't being used and can be
simulated in other ways with a bit of care.
What are the chances that I've added and moved all the files correctly
in this commit, and not broken the amd64 port?
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3636
- 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
string in valgrind.pc.in, so that they describe Valgrind as a "dynamic
binary instrumentation framework", and don't mention platforms at all.
I had to tweak the regtest filters a bit for this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3178
- implemented VG_(clone)()
- implemented PLATFORM_DO_MMAP()
- implemented VG_(init_thread1state)() [will need to be updated as the
Vex AMD64 guest state is updated]
- implemented OYNK, because it's useful
Also a couple of general cleaning up things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3165
It compiles, but aborts immediately if you try to run it.
I didn't include ldt.c; I'm not sure how the LDT is used on AMD64. It can be
added later if necessary.
While doing this, did some 64-bit cleanness fixes:
- Added necessary intermediate casts to ULong to avoid warnings when converting
ThreadId to void* and vice versa, in vg_scheduler.c.
- Fixed VALGRIND_NON_SIMD_CALL[0123] to use 'long' as the return type.
- Fixed VALGRIND_PRINTF{,BACKTRACE} to use unsigned longs instead of unsigned
ints, as needed.
- Converted some offsets in vg_symtab2.h from "Int" to "OffT".
- Made strlen, strncat, etc, use SizeT instead of 'unsigned int' for the length
parameter.
- Couple of other minor things.
I had to insert some "#ifdef __amd64__" and "#ifndef __amd64__" guards in
places. In particular, in vg_mylibc.c, some of our syscall wrappers aren't
appropriate for AMD64 because the syscall numbering is a bit different in
places. This difference will have to be abstracted out somehow.
Also rewrote the sys_fcntl and sys_fcntl64 wrappers, as required for AMD64.
Also moved the ipc wrapper into x86, since it's not applicable for
AMD64. However, it is applicable (I think) for ARM, so it would be nice
to work out a way to share syscall wrappers between some, but not all,
archs. Hmm. Also now using the real IPC constants rather than magic
numbers in the wrapper.
Other non-AMD64-related fixes:
- ARM: fixed syscall table by accounting for the fact that syscall
numbers don't start at 0, but rather at 0x900000.
- Converted a few places to use ThreadId instead of 'int' or 'Int' for
thread IDs.
- Added both AMD64 and ARM (which I'd forgotten) entries to valgrind.spec.in.
- Tweaked comments in various places.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3136