]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* thread.c (do_captured_thread_select): Add context-changed
authorKeith Seitz <keiths@redhat.com>
Wed, 28 Aug 2002 16:55:55 +0000 (16:55 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 28 Aug 2002 16:55:55 +0000 (16:55 +0000)
        notification.
        * infrun.c (handle_inferior_event): Remove context-changed
        notification. The stop result already has this information.

        * thread.c (do_captured_list_thread_ids): Use ui_out_list_begin/end
        instead of ui_out_tuple_begin/end.

gdb/ChangeLog
gdb/infrun.c
gdb/thread.c

index ecf5c991984a4c022bf7e68f8bea2b1b42bdbca3..6d1f478a1655f8620099f6554b2918711d459f5e 100644 (file)
@@ -1,3 +1,13 @@
+2002-08-28  Keith Seitz  <keiths@redhat.com>
+
+       * thread.c (do_captured_thread_select): Add context-changed
+       notification.
+       * infrun.c (handle_inferior_event): Remove context-changed
+       notification. The stop result already has this information.
+
+       * thread.c (do_captured_list_thread_ids): Use ui_out_list_begin/end
+       instead of ui_out_tuple_begin/end.
+
 2002-08-22  Keith Seitz  <keiths@redhat.com>
 
        * breakpoint.c (internal_breakpoint_number): Revert 2002-06-18 change.
index dc387cddd55e1fd0f8a832e3556221fc1b8a5127..672d5f93c65afa030ba99f1a91e68d5a94166a6a 100644 (file)
@@ -1947,7 +1947,6 @@ handle_inferior_event (struct execution_control_state *ecs)
 
       context_switch (ecs);
 
-      context_changed_event (pid_to_thread_id (ecs->ptid));
       if (context_hook)
        context_hook (pid_to_thread_id (ecs->ptid));
 
index fa5eb27b15c0e4780e0027fbb8a4d26d8f9e7fef..b050682450f70d24d5391877cb62763d177ae184 100644 (file)
@@ -262,7 +262,7 @@ do_captured_list_thread_ids (struct ui_out *uiout,
   struct thread_info *tp;
   int num = 0;
 
-  ui_out_tuple_begin (uiout, "thread-ids");
+  ui_out_list_begin (uiout, "thread-ids");
 
   for (tp = thread_list; tp; tp = tp->next)
     {
@@ -270,7 +270,7 @@ do_captured_list_thread_ids (struct ui_out *uiout,
       ui_out_field_int (uiout, "thread-id", tp->num);
     }
 
-  ui_out_tuple_end (uiout);
+  ui_out_list_end (uiout);
   ui_out_field_int (uiout, "number-of-threads", num);
   return GDB_RC_OK;
 }
@@ -690,10 +690,12 @@ do_captured_thread_select (struct ui_out *uiout,
                           void *tidstr)
 {
   int num;
+  ptid_t old_ptid;
   struct thread_info *tp;
 
   num = value_as_long (parse_and_eval (tidstr));
 
+  old_ptid = inferior_ptid;
   tp = find_thread_id (num);
 
   if (!tp)
@@ -715,6 +717,10 @@ do_captured_thread_select (struct ui_out *uiout,
   ui_out_text (uiout, ")]");
 
   print_stack_frame (selected_frame, frame_relative_level (selected_frame), 1);
+
+  if (!ptid_equal (old_ptid, inferior_ptid))
+    context_changed_event (pid_to_thread_id (inferior_ptid));
+
   return GDB_RC_OK;
 }