This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Pass 'saved_singlestep_ptid' to deprecated_context_hook.
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 19 Nov 2012 11:03:44 +0800
- Subject: [PATCH] Pass 'saved_singlestep_ptid' to deprecated_context_hook.
Hi,
I read this part, and it looks incorrect to me. context_switch is called
with parameter 'saved_singlestep_ptid' first and then,
deprecated_context_hook should be called with 'saved_singlestep_ptid' as
well.
This part was last changed by this patch, and it looks an oversight that
parameter for deprecated_context_hook is not updated to
'saved_singlestep_ptid'.
@@ -2086,8 +2124,7 @@ handle_inferior_event (struct execution_
ecs->random_signal = 0;
- ecs->ptid = saved_singlestep_ptid;
- context_switch (ecs);
+ context_switch (saved_singlestep_ptid);
if (deprecated_context_hook)
deprecated_context_hook (pid_to_thread_id (ecs->ptid));
Re: [non-stop] 05/10 Refactor a bit infrun.c
http://sourceware.org/ml/gdb-patches/2008-07/msg00013.html
Rebuilt GDB, but don't run regression test, because deprecated_context_hook
is not installed in GDB.
gdb:
2012-11-18 Yao Qi <yao@codesourcery.com>
* infrun.c (handle_inferior_event): Pass 'saved_singlestep_ptid'
to deprecated_context_hook.
---
gdb/infrun.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4cc2e54..16cc9b1 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3783,7 +3783,7 @@ handle_inferior_event (struct execution_control_state *ecs)
context_switch (saved_singlestep_ptid);
if (deprecated_context_hook)
- deprecated_context_hook (pid_to_thread_id (ecs->ptid));
+ deprecated_context_hook (pid_to_thread_id (saved_singlestep_ptid));
resume (1, GDB_SIGNAL_0);
prepare_to_wait (ecs);
--
1.7.7.6