CVS commit by nethercote: Tweak type of VGA_(thread_syscall), and related variable name changes. M +2 -2 core.h 1.42 M +2 -1 vg_proxylwp.c 1.25 M +15 -15 x86-linux/syscalls.c 1.3 --- valgrind/coregrind/core.h #1.41:1.42 @@ -1540,7 +1540,7 @@ extern const Addr vga_sys_before, vga_sy 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); --- valgrind/coregrind/vg_proxylwp.c #1.24:1.25 @@ -621,5 +621,6 @@ 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 */ --- valgrind/coregrind/x86-linux/syscalls.c #1.2:1.3 @@ -131,17 +131,17 @@ asm( %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 } @@ -149,7 +149,7 @@ void VGA_(thread_syscall)(Int syscallno, // 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 @@ -159,10 +159,10 @@ void VGA_(restart_syscall)(arch_thread_t */ { - 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);