summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-08-28 16:55:55 +0000
committerKeith Seitz <keiths@redhat.com>2002-08-28 16:55:55 +0000
commitb106411a2288ca044f885c81b066318113069615 (patch)
tree8df5828ee5f2782a5acbdc798755fb2c7c6b9d76
parent4f238d9a007fbc138b841b2c1f0fd5c0a3837667 (diff)
downloadgdb-b106411a2288ca044f885c81b066318113069615.tar.gz
* 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.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/infrun.c1
-rw-r--r--gdb/thread.c10
3 files changed, 18 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ecf5c991984..6d1f478a165 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index dc387cddd55..672d5f93c65 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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));
diff --git a/gdb/thread.c b/gdb/thread.c
index fa5eb27b15c..b050682450f 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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;
}