This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Fix set debug target 1


"set debug target 1" does not currently work with "target sim".  I
broke this a couple of months ago by introducing new calls to
update_current_target.  Every time we rebuild current_target, we
should put the debug target back in.

Tested by hand on arm-none-eabi, committed as obvious (to HEAD).

-- 
Daniel Jacobowitz
CodeSourcery

2007-10-10  Daniel Jacobowitz  <dan@codesourcery.com>

	* target.c (update_current_target): Call setup_target_debug.
	(push_target): Do not call it here.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.147
diff -u -p -r1.147 target.c
--- target.c	23 Aug 2007 18:08:45 -0000	1.147
+++ target.c	10 Oct 2007 13:23:01 -0000
@@ -649,6 +649,9 @@ update_current_target (void)
      "current_target".  That way code looking for a non-inherited
      target method can quickly and simply find it.  */
   current_target.beneath = target_stack;
+
+  if (targetdebug)
+    setup_target_debug ();
 }
 
 /* Mark OPS as a running target.  This reverses the effect
@@ -752,9 +755,6 @@ push_target (struct target_ops *t)
 
   update_current_target ();
 
-  if (targetdebug)
-    setup_target_debug ();
-
   /* Not on top?  */
   return (t != target_stack);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]