Commit Graph

51 Commits

Author SHA1 Message Date
Tom Hughes
d6a91b8ec3 Move the replacement code for the amd64 vsyscalls into the trampoline page
so that it is copied into the client space. This avoid warnings from memcheck
because it doesn't think that code inside valgrind is valid.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3591
2005-05-02 10:28:42 +00:00
Tom Hughes
dd1b51f37c Add support for the fadvise system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3571
2005-04-26 08:13:24 +00:00
Julian Seward
c862370c01 amd64 build fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3567
2005-04-25 16:21:17 +00:00
Julian Seward
0d4f070b04 Make amd64-linux build again after m_sigframe hackery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3557
2005-04-24 14:31:29 +00:00
Julian Seward
6022de545d Even more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3524
2005-04-07 02:23:50 +00:00
Nicholas Nethercote
fe21329e16 Renamed and retyped the fields relating to valgrind's stack in os_state_t to
make their role clearer and their behaviour more consistent with the fields
describing the client's stack.  Also made the code in x86-linux/syscalls.c
and amd64-linux/syscalls.c more word-size-independent, which is not strictly
necessary but makes the code similarities between the two files more
obvious.

One consequence of this is that Valgrind's stack on AMD64 is now 16384 * 8
bytes, rather than 16384 * 4 bytes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3520
2005-04-05 02:49:09 +00:00
Tom Hughes
eaea598d41 Removed references to client_stack_base which no longer exists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3519
2005-04-04 07:15:04 +00:00
Nicholas Nethercote
c8f3476758 minor cleanup with the stack-related fields in ThreadState:
- removed "stack_base" which wasn't used in any meaningful way
- added "client_" prefix to make it clear they concern the client's stack
- renamed "stack_size" as "client_stack_szB" to make the units clear



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3516
2005-04-04 02:41:42 +00:00
Tom Hughes
577fc708f5 More amd64 system calls - emacs will now run under valgrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3511
2005-04-02 17:43:50 +00:00
Tom Hughes
8ab17244a8 Add VGP_(setup_redirects) to the platform specific layers and use
it to setup vsyscall redirects on amd64 and the _dl_sysinfo_int80
redirect on x86.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3503
2005-04-02 15:53:01 +00:00
Tom Hughes
938b22c9c2 Even more amd64 system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3499
2005-04-02 11:39:56 +00:00
Tom Hughes
6f26888fd7 Yet more amd64 system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3498
2005-04-01 23:38:37 +00:00
Tom Hughes
e29c8a9ebd More amd64 system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3497
2005-04-01 23:22:36 +00:00
Tom Hughes
61ca56765a Move the gettid system call to the linux specific section.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3493
2005-03-31 16:02:07 +00:00
Tom Hughes
6eccce80ba Discard the sys_socketcall wrapper (there is no socketcall system
call on amd64) and add a proper sys_socket wrapper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3480
2005-03-30 08:22:38 +00:00
Tom Hughes
ba4f330105 Build the arch, os and platform libraries as PIE code if PIE is
enabled as they get linked into stage2 which is the PIE part.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3472
2005-03-29 08:09:31 +00:00
Tom Hughes
2a192a048f The open system call has a post handler.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3469
2005-03-28 23:25:58 +00:00
Tom Hughes
acdb4b9b02 Implement some more system calls on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3468
2005-03-28 18:19:45 +00:00
Julian Seward
3d55d57480 Reinstate a few more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3466
2005-03-27 18:20:26 +00:00
Julian Seward
897aefaee9 comment-only change
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3464
2005-03-27 04:08:09 +00:00
Julian Seward
417691eb5a Track generic and x86 changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3456
2005-03-27 01:35:16 +00:00
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
Julian Seward
c5dc229747 Unbreak amd64 build. We need to have an overnight autobuild running
on amd64 asap.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3441
2005-03-26 13:33:27 +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
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
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
43e6c44681 Various amd64 syscall improvements (Tom Hughes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3425
2005-03-24 17:52:02 +00:00
Julian Seward
42bce07a58 More syscall fixes (Tom Hughes).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3411
2005-03-23 11:41:15 +00:00
Julian Seward
0d46389ab0 Fix a bunch of amd64 syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3410
2005-03-23 03:42:26 +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
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
ba91df6db8 Remove the alignment arg from VG_(arena_calloc)() and VG_(arena_realloc)(),
because it was always being set to VG_MIN_ALLOC_SZB, and so was just one
more thing to get wrong, as well as exposing VG_MIN_ALLOC_SZB to more places
than necessary.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3340
2005-03-13 14:56:31 +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
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
435d820b6d Clean up handling of socket system calls on amd64-linux, so that the
code for them is shared between amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3257
2005-03-01 19:00:30 +00:00
Julian Seward
a84f1bd656 More amd64 system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3250
2005-02-19 22:45:15 +00:00
Julian Seward
a5787a4558 Fix enough syscalls to get through 'hello world' on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3246
2005-02-17 09:30:21 +00:00
Julian Seward
e57df07ce8 Duh; mmap doesn't work if you don't use the post-mmap wrapper too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3243
2005-02-16 01:58:01 +00:00
Julian Seward
60454f22a5 amd64-linux syscall support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3234
2005-02-13 10:47:24 +00:00
Julian Seward
768ce51a26 Make amd64 signal returns work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3233
2005-02-08 15:00:48 +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
a576e88663 Fix amd64 assembly for presumably newer binutils.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3229
2005-02-05 14:59:25 +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
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
1b64ae853c Added the skeleton of the AMD64 syscall table, all commented out, but
ready to go.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3145
2004-11-29 17:28:41 +00:00
Nicholas Nethercote
61fcb2828d Gave VG_(do_syscall)() a more specific prototype:
Int VG_(do_syscall) ( UInt, UWord, UWord, UWord, UWord, UWord, UWord );

to replace the previous:
  
  Int VG_(do_syscall) ( UInt, ... )

Reason being that sometimes you could get incorrect args passed, when
passing 32-bit ints on 64-bit platforms.  I also added macros
VG_(do_syscall[123456]) to make life easier, and converted all the
relevant calls.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3143
2004-11-29 16:49:18 +00:00