From: Nicholas Nethercote Date: Sat, 12 Mar 2005 05:48:06 +0000 (+0000) Subject: Remove dead functions: VG_(set_arg_and_bogus_ret), VG_(thread_initial_stack). X-Git-Tag: svn/VALGRIND_3_0_0~1024 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29cc7c8a6c2765345519122500199eee8e7ce6fd;p=thirdparty%2Fvalgrind.git Remove dead functions: VG_(set_arg_and_bogus_ret), VG_(thread_initial_stack). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3294 --- diff --git a/coregrind/amd64/state.c b/coregrind/amd64/state.c index c5d9cdc926..028b3b9c57 100644 --- a/coregrind/amd64/state.c +++ b/coregrind/amd64/state.c @@ -109,46 +109,6 @@ void VGA_(setup_child) ( ThreadArchState *arch, ThreadArchState *parent_arch ) #endif } -void VGA_(set_arg_and_bogus_ret)( ThreadId tid, UWord arg, Addr ret ) -{ - I_die_here; -#if 0 - /* Push the arg, and mark it as readable. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = arg; - VG_TRACK( post_mem_write, Vg_CoreSignal, tid, - VG_(threads)[tid].arch.vex.guest_ESP, sizeof(void*) ); - - /* Don't mark the pushed return address as readable; any attempt to read - this is an internal valgrind bug since thread_exit_wrapper() should not - return. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = ret; -#endif -} - -void VGA_(thread_initial_stack)(ThreadId tid, UWord arg, Addr ret) -{ - I_die_here; -#if 0 - Addr esp = (Addr)STACK_PTR(VG_(threads)[tid].arch); - - /* push two args */ - esp -= 2 * sizeof(UWord); - SET_PTHREQ_ESP(tid, esp); - - VG_TRACK ( new_mem_stack, esp, 2 * sizeof(UWord) ); - VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack", - esp, 2 * sizeof(UWord) ); - - /* push arg and (bogus) return address */ - *(UWord*)(esp+sizeof(UWord)) = arg; - *(UWord*)(esp) = ret; - - VG_TRACK ( post_mem_write, Vg_CoreSignal, tid, esp, 2 * sizeof(UWord) ); -#endif -} - /*------------------------------------------------------------*/ /*--- Symtab stuff ---*/ diff --git a/coregrind/arm/state.c b/coregrind/arm/state.c index a94b41af4e..2cd8ff832e 100644 --- a/coregrind/arm/state.c +++ b/coregrind/arm/state.c @@ -87,45 +87,6 @@ void VGA_(setup_child) ( ThreadArchState *regs, ThreadArchState *parent_regs ) #endif } -void VGA_(set_arg_and_bogus_ret)( ThreadId tid, UWord arg, Addr ret ) -{ - I_die_here; -#if 0 - /* Push the arg, and mark it as readable. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = arg; - VG_TRACK( post_mem_write, VG_(threads)[tid].arch.vex.guest_ESP, sizeof(void*) ); - - /* Don't mark the pushed return address as readable; any attempt to read - this is an internal valgrind bug since thread_exit_wrapper() should not - return. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = ret; -#endif -} - -void VGA_(thread_initial_stack)(ThreadId tid, UWord arg, Addr ret) -{ - I_die_here; -#if 0 - Addr esp = (Addr)ARCH_STACK_PTR(VG_(threads)[tid].arch); - - /* push two args */ - esp -= 2 * sizeof(UWord); - SET_PTHREQ_ESP(tid, esp); - - VG_TRACK ( new_mem_stack, esp, 2 * sizeof(UWord) ); - VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack", - esp, 2 * sizeof(UWord) ); - - /* push arg and (bogus) return address */ - *(UWord*)(esp+sizeof(UWord)) = arg; - *(UWord*)(esp) = ret; - - VG_TRACK ( post_mem_write, esp, 2 * sizeof(UWord) ); -#endif -} - /*------------------------------------------------------------*/ /*--- Symtab stuff ---*/ diff --git a/coregrind/core.h b/coregrind/core.h index ac28b8bb48..39ed9ef07f 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -1742,9 +1742,6 @@ extern void extern void VGA_(cleanup_thread) ( ThreadArchState* ); extern void VGA_(setup_child) ( ThreadArchState*, ThreadArchState* ); -extern void VGA_(set_arg_and_bogus_ret) ( ThreadId tid, UWord arg, Addr ret ); -extern void VGA_(thread_initial_stack) ( ThreadId tid, UWord arg, Addr ret ); - // OS/Platform-specific thread clear (after thread exit) extern void VGA_(os_state_clear)(ThreadState *); diff --git a/coregrind/x86/state.c b/coregrind/x86/state.c index a1e459b57f..35a381739a 100644 --- a/coregrind/x86/state.c +++ b/coregrind/x86/state.c @@ -285,42 +285,6 @@ void VGA_(setup_child) ( /*OUT*/ ThreadArchState *child, } -void VGA_(set_arg_and_bogus_ret)( ThreadId tid, UWord arg, Addr ret ) -{ - /* Push the arg, and mark it as readable. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = arg; - VG_TRACK( post_mem_write, Vg_CoreSignal, tid, - VG_(threads)[tid].arch.vex.guest_ESP, sizeof(void*) ); - - /* Don't mark the pushed return address as readable; any attempt to read - this is an internal valgrind bug since thread_exit_wrapper() should not - return. */ - SET_PTHREQ_ESP(tid, VG_(threads)[tid].arch.vex.guest_ESP - sizeof(UWord)); - * (UInt*)(VG_(threads)[tid].arch.vex.guest_ESP) = ret; -} - - -void VGA_(thread_initial_stack)(ThreadId tid, UWord arg, Addr ret) -{ - Addr esp = (Addr)STACK_PTR(VG_(threads)[tid].arch); - - /* push two args */ - esp -= 2 * sizeof(UWord); - SET_PTHREQ_ESP(tid, esp); - - VG_TRACK ( new_mem_stack, esp, 2 * sizeof(UWord) ); - VG_TRACK ( pre_mem_write, Vg_CorePThread, tid, "new thread: stack", - esp, 2 * sizeof(UWord) ); - - /* push arg and (bogus) return address */ - *(UWord*)(esp+sizeof(UWord)) = arg; - *(UWord*)(esp) = ret; - - VG_TRACK ( post_mem_write, Vg_CoreSignal, tid, esp, 2 * sizeof(UWord) ); -} - - void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr)) { ThreadState *tst = VG_(get_ThreadState)(tid);