]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove dead functions: VG_(set_arg_and_bogus_ret), VG_(thread_initial_stack).
authorNicholas Nethercote <njn@valgrind.org>
Sat, 12 Mar 2005 05:48:06 +0000 (05:48 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 12 Mar 2005 05:48:06 +0000 (05:48 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3294

coregrind/amd64/state.c
coregrind/arm/state.c
coregrind/core.h
coregrind/x86/state.c

index c5d9cdc92614b567c84131609105838aa9886a8e..028b3b9c57669da6356ee735ef8a41231dd1e1c3 100644 (file)
@@ -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                                         ---*/
index a94b41af4eca7d53db374f5c6140a3e318dc4fb5..2cd8ff832ecfc852d705e6215e6968e96a48f6cf 100644 (file)
@@ -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                                         ---*/
index ac28b8bb48c8d18fcc0d1f88df38dfe9a22f6df0..39ed9ef07f7aefaadb0d87ba88ac166fc74ed83c 100644 (file)
@@ -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 *);
 
index a1e459b57fd3b26ab6e55606a4e7530db035a4b3..35a381739a6e82800049b0bd2288998b5c643014 100644 (file)
@@ -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);