From: Nicholas Nethercote Date: Mon, 18 Oct 2004 17:41:36 +0000 (+0000) Subject: Tweak type of VGA_(thread_syscall), and related variable name changes. X-Git-Tag: svn/VALGRIND_3_0_0~1502 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f19fdbd136f4e02c3fe9d0b61e616bfd88147b2b;p=thirdparty%2Fvalgrind.git Tweak type of VGA_(thread_syscall), and related variable name changes. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2793 --- diff --git a/coregrind/core.h b/coregrind/core.h index fcbd760c5f..a3dc1060eb 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -1539,9 +1539,9 @@ extern Int VGA_(pop_signal_frame) ( ThreadId tid ); extern const Addr vga_sys_before, vga_sys_restarted, vga_sys_after, vga_sys_done; -extern void VGA_(restart_syscall)(arch_thread_t* tst); +extern void VGA_(restart_syscall)(arch_thread_t* arch); -extern void VGA_(thread_syscall)(Int syscallno, ThreadState* tst, +extern void VGA_(thread_syscall)(Int syscallno, arch_thread_t* arch, enum PXState* state, enum PXState poststate); /* --------------------------------------------------------------------- diff --git a/coregrind/vg_proxylwp.c b/coregrind/vg_proxylwp.c index 3b0a681a4f..8f7cb77d4b 100644 --- a/coregrind/vg_proxylwp.c +++ b/coregrind/vg_proxylwp.c @@ -620,7 +620,8 @@ static Int proxylwp(void *v) /* ST:4 */ - VGA_(thread_syscall)(syscallno, tst, &px->state, PXS_SysDone); + VGA_(thread_syscall)(syscallno, &tst->arch, + &px->state, PXS_SysDone); /* ST:5 */ diff --git a/coregrind/x86-linux/syscalls.c b/coregrind/x86-linux/syscalls.c index 6d5f596565..e52d508926 100644 --- a/coregrind/x86-linux/syscalls.c +++ b/coregrind/x86-linux/syscalls.c @@ -130,27 +130,27 @@ asm( Assumes that the only thread state which matters is the contents of %eax-%ebp and the return value in %eax. */ -void VGA_(thread_syscall)(Int syscallno, ThreadState *tst, +void VGA_(thread_syscall)(Int syscallno, arch_thread_t *arch, enum PXState *state , enum PXState poststate) { - do_thread_syscall(syscallno, /* syscall no. */ - tst->arch.m_ebx, /* arg 1 */ - tst->arch.m_ecx, /* arg 2 */ - tst->arch.m_edx, /* arg 3 */ - tst->arch.m_esi, /* arg 4 */ - tst->arch.m_edi, /* arg 5 */ - tst->arch.m_ebp, /* arg 6 */ - &tst->arch.m_eax, /* result */ - state, /* state to update */ - poststate); /* state when syscall has finished */ + do_thread_syscall(syscallno, // syscall no. + arch->m_ebx, // arg 1 + arch->m_ecx, // arg 2 + arch->m_edx, // arg 3 + arch->m_esi, // arg 4 + arch->m_edi, // arg 5 + arch->m_ebp, // arg 6 + &arch->m_eax, // result + state, // state to update + poststate); // state when syscall has finished } // Back up to restart a system call. -void VGA_(restart_syscall)(arch_thread_t *tst) +void VGA_(restart_syscall)(arch_thread_t *arch) { - tst->m_eip -= 2; // sizeof(int $0x80) + arch->m_eip -= 2; // sizeof(int $0x80) /* Make sure our caller is actually sane, and we're really backing back over a syscall. @@ -158,12 +158,12 @@ void VGA_(restart_syscall)(arch_thread_t *tst) int $0x80 == CD 80 */ { - UChar *p = (UChar *)tst->m_eip; + UChar *p = (UChar *)arch->m_eip; if (p[0] != 0xcd || p[1] != 0x80) VG_(message)(Vg_DebugMsg, "?! restarting over syscall at %p %02x %02x\n", - tst->m_eip, p[0], p[1]); + arch->m_eip, p[0], p[1]); vg_assert(p[0] == 0xcd && p[1] == 0x80); }