Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Enhancement - show old and new thread info when switching during debugging
@ 2011-07-29 15:29 pfee
  2011-07-29 16:01 ` Joel Brobecker
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: pfee @ 2011-07-29 15:29 UTC (permalink / raw)
  To: gdb-patches

Hello all,

The following patch is also attached to bug 13042.
http://sourceware.org/bugzilla/show_bug.cgi?id=13042

It gives the user info about the thread they're switching from in addition to 
that which they're switching to.  This is useful if the switch was not intended 
and 

they wish to continue debugging the old thread.

Thanks,
Paul

2011-07-29  Paul Fee  <pfee@talk21.com>

    * infrun.c (normal_stop): Output information about previous thread when 
switching

Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.497
diff -u -r1.497 infrun.c
--- infrun.c    21 Jul 2011 23:46:09 -0000      1.497
+++ infrun.c    29 Jul 2011 13:54:44 -0000
@@ -5770,9 +5770,12 @@
       && last.kind != TARGET_WAITKIND_SIGNALLED
       && last.kind != TARGET_WAITKIND_EXITED)
     {
+      const char* previous_pid_str = strdup (target_pid_to_str 
(previous_inferior_ptid));
       target_terminal_ours_for_output ();
-      printf_filtered (_("[Switching to %s]\n"),
-                      target_pid_to_str (inferior_ptid));
+      printf_filtered (_("[Switching from %s to %s]\n"),
+                       previous_pid_str,
+                       target_pid_to_str (inferior_ptid));
+      free ((void*)previous_pid_str);
       annotate_thread_changed ();
       previous_inferior_ptid = inferior_ptid;
     }


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-08-16 16:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29 15:29 Enhancement - show old and new thread info when switching during debugging pfee
2011-07-29 16:01 ` Joel Brobecker
2011-07-29 16:33   ` pfee
2011-07-29 17:38     ` Joel Brobecker
2011-07-29 17:47       ` pfee
2011-07-29 20:40         ` Philippe Waroquiers
2011-07-30  2:44   ` Tom Tromey
2011-07-30 11:39     ` Joel Brobecker
2011-07-30 11:44       ` Pedro Alves
2011-07-30 14:12         ` pfee
2011-08-08 11:35           ` pfee
2011-08-08 15:07             ` Pedro Alves
2011-08-08 15:20               ` pfee
2011-08-09 15:25                 ` pfee
2011-08-10 15:10                   ` Pedro Alves
2011-08-16 16:01                     ` pfee
2011-07-30 12:40       ` pfee
2011-07-30 11:32 ` Tom Tromey
2011-07-30 22:07 ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox