From: Nick Roberts Date: Fri, 6 Jun 2008 00:33:52 +0000 (+0000) Subject: * annotate.c (annotate_thread_changed): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8fa951a9b0f00619f42a28a044d8e334ff646f8;p=binutils-gdb.git * annotate.c (annotate_thread_changed): New function. * thread.c (thread_command) : Use it. * infrun.c (normal_stop): Use it. --- diff --git a/gdb/annotate.c b/gdb/annotate.c index ee9adfac0fb..98a37aea423 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -242,6 +242,15 @@ annotate_new_thread (void) } } +void +annotate_thread_changed (void) +{ + if (annotation_level > 1) + { + printf_unfiltered (("\n\032\032thread-changed\n")); + } +} + void annotate_field_begin (struct type *type) { diff --git a/gdb/infrun.c b/gdb/infrun.c index a1bb28713d3..2960acb2a8f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3605,6 +3605,7 @@ normal_stop (void) target_terminal_ours_for_output (); printf_filtered (_("[Switching to %s]\n"), target_pid_to_str (inferior_ptid)); + annotate_thread_changed (); previous_inferior_ptid = inferior_ptid; } diff --git a/gdb/thread.c b/gdb/thread.c index 773ba5c1999..446a55ece03 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -738,6 +738,7 @@ thread_command (char *tidstr, int from_tty) return; } + annotate_thread_changed (); gdb_thread_select (uiout, tidstr, NULL); }