33 Commits

Author SHA1 Message Date
Julian Seward
64824ad318 More amd64 signal handling fixes (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3443
2005-03-26 13:48:19 +00:00
Nicholas Nethercote
bb4598350e Obsoleted three client requests that were still hanging around from the old
libpthread implementation: USERREQ__READ_MILLISECOND_TIMER, USERREQ__MALLOC,
USERREQ__FREE.

As a consequence, all the PTHREQ macros (eg. VGA_PTHREQ_RET,
SET_PTHREQ_RETVAL) could be removed.  And VG_(tl_malloc_called_by_scheduler)
has been renamed VG_(tl_malloc_called_deliberately) to reflect how its role
has changed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3438
2005-03-26 03:50:14 +00:00
Nicholas Nethercote
66b2b7d5ad Use "VGA_" prefix more consistently.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3434
2005-03-26 00:32:29 +00:00
Nicholas Nethercote
cb6c8b4bd2 Use "VGA_" prefix more consistently for arch-specific things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3433
2005-03-26 00:18:45 +00:00
Nicholas Nethercote
0f0863110d Rename some arch-specific macros to use the more consistent "VGA_" prefix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3432
2005-03-26 00:04:03 +00:00
Julian Seward
2f61b2f293 setup_pointercheck(): be silent
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3428
2005-03-24 20:38:24 +00:00
Julian Seward
7e67ae71fd Initial get-threads-working patch (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3427
2005-03-24 19:38:57 +00:00
Julian Seward
cd44efd2cf A first cut at amd64 signal frame build/unbuild, from Tom Hughes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3424
2005-03-24 17:48:02 +00:00
Julian Seward
10d241c300 Finally finish pissing around with jmp_with_stack. Now at least we
can get a startup on amd64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3403
2005-03-22 02:03:09 +00:00
Julian Seward
9d7b4d9ae2 Mucho buggering about jmp_with_stack and its kin. Jeez. Now the
amd64 version is broken again.  Writing code with undocumented
assumptions should be a firable offense.  At the very least.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3402
2005-03-22 01:55:35 +00:00
Julian Seward
28650c3aa0 jmp_with_stack is a hack which makes no sense on archs which pass args
in registers.  Replace it (for amd64) with something more disciplined:
call_on_new_stack_0_0 and call_on_new_stack_0_1.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3401
2005-03-22 00:19:55 +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
Julian Seward
3286b17553 No longer needed. Bye!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3299
2005-03-12 14:40:38 +00:00
Nicholas Nethercote
29cc7c8a6c Remove dead functions: VG_(set_arg_and_bogus_ret), VG_(thread_initial_stack).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3294
2005-03-12 05:48:06 +00:00
Julian Seward
2e00d9e22a Fix enough syscall stuff so that simple X applications run (xfontsel,
xedit).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3261
2005-03-02 16:01:23 +00:00
Julian Seward
243713971c Minimal, horrible hacks needed to make vsyscalls work on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3259
2005-03-02 14:06:08 +00:00
Julian Seward
2cfb6bc855 On AMD64 it's valid to access up to 128 bytes below %rsp. Or to be
more accurate, on the amd64-linux ABI that is allowable.  Anyway,
parameterise the signal handler so it isn't confused by such accesses.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3252
2005-02-25 02:45:39 +00:00
Julian Seward
f62998dc1b Clean up startup grunge a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3249
2005-02-18 09:39:05 +00:00
Julian Seward
d033437190 Remove misc debug printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3240
2005-02-13 11:02:12 +00:00
Julian Seward
3e6c170f75 Debugging hacks (switchback routine -- unused)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3238
2005-02-13 10:56:22 +00:00
Julian Seward
f224865e9e Fix enough stuff so it will start up and run for a few bbs on amd64,
before dying.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3230
2005-02-05 18:27:14 +00:00
Julian Seward
24777514e0 AMD64 build fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3227
2005-01-19 14:05:09 +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
cc7e5987be Un-hardwired x86 as the insn set to be translated. Also moved around
some constants.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3172
2004-11-30 23:39:13 +00:00
Nicholas Nethercote
b4421b93e7 Implemented the dispatch loop for AMD64. Works at least enough to do
through once, failing to find the translation, and falling back to the
scheduler.

Did a couple of minor associated cleanups too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3171
2004-11-30 23:32:01 +00:00
Nicholas Nethercote
287eca27b9 More AMD64 start-up hurdles:
- Fix bogus assertion in vg_transtab.c
- Do null implementation of --pointercheck

We now reach the dispatch loop!



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3166
2004-11-30 16:50:48 +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
61c97ea72d Clear next AMD64 startup hurdle. Required copying the x86 LDT code.
Not sure if it's the right thing to do long-term, but good enough for
now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3164
2004-11-30 15:10:02 +00:00
Nicholas Nethercote
244787cc7f Get AMD64 slightly further before dying:
- implemented VG_(do_syscall)()
- fixed a problem in ume.c with mapping when loading, which was causing
  stage2's memory to be trashed
- fixed stage2.lds substitution so stage2 goes in the right address



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3156
2004-11-30 11:40:24 +00:00
Nicholas Nethercote
decc1ddb43 Implemented jmp_with_stack for AMD64. Cleaned up the
comments/formatting of jmp_with_stack for ARM and x86, too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3149
2004-11-29 17:59:00 +00:00
Nicholas Nethercote
146a07a91f Remove string "panic_msg_ebp" from x86/dispatch.S and amd64/dispatch.S,
as it is never used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3138
2004-11-29 14:44:09 +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