Commit Graph

12 Commits

Author SHA1 Message Date
Nicholas Nethercote
9e20a9de6f Remove VGP_LONGJMP and VGP_SETJMP, since they're the same on all
platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3746
2005-05-16 20:50:52 +00:00
Nicholas Nethercote
7a6ee2fc93 Improved structure of LDT-related code:
- 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
2005-05-15 20:52:04 +00:00
Nicholas Nethercote
63901a5d88 Put all the system call stuff in a new module, m_syscalls. This
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
2005-05-08 14:45:13 +00:00
Nicholas Nethercote
fe432113e6 A crucial, crucial change: update my email address.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3632
2005-05-08 02:10:27 +00:00
Nicholas Nethercote
715351c3f8 Cleanups of syscall-related macros:
- 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
2005-05-08 02:04:49 +00:00
Nicholas Nethercote
8853545f0f Use VGP_ prefix more consistently for platform-specific exports.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3436
2005-03-26 02:42:31 +00:00
Julian Seward
d156fe938e Horrible syscall-related hacks to make it at least compile on amd64.
Doesn't work yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3400
2005-03-21 17:43:34 +00:00
Julian Seward
3f507c5e4e Fill in a bunch of amd64-specific crud. Still won't link though.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3382
2005-03-16 22:04:40 +00:00
Nicholas Nethercote
05fe123a9e Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303
2005-03-12 16:22:54 +00:00
Nicholas Nethercote
ce2585d447 Changed message at the top of files, and the startup message, and the
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
2004-12-01 14:14:42 +00:00
Nicholas Nethercote
ad1bf0073e Clear a few more AMD64 start-up hurdles:
- 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
2004-11-30 16:04:58 +00:00
Nicholas Nethercote
10b4595add Added beginnings of an AMD64 port, so lots of new files and directories.
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
2004-11-29 13:54:10 +00:00