This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 03/17] Displaced stepping debug: fetch the right regcache
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 1 Apr 2015 23:14:00 +0100
- Subject: [PATCH 03/17] Displaced stepping debug: fetch the right regcache
- Authentication-results: sourceware.org; auth=none
- References: <1427926454-16431-1-git-send-email-palves at redhat dot com>
Although not currently possible in practice when we get here,
'resume_ptid' can also be a wildcard throughout this function. It's
clearer to fetch the regcache using the thread's ptid.
gdb/ChangeLog:
2015-04-01 Pedro Alves <pedro@codesourcery.com>
* infrun.c (resume) <displaced stepping debug output>: Get the
leader thread's regcache, not resume_ptid's.
---
gdb/infrun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index cf0ef32..f23e76e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2374,7 +2374,7 @@ resume (enum gdb_signal sig)
&& tp->control.trap_expected
&& use_displaced_stepping_now_p (gdbarch, sig))
{
- struct regcache *resume_regcache = get_thread_regcache (resume_ptid);
+ struct regcache *resume_regcache = get_thread_regcache (tp->ptid);
struct gdbarch *resume_gdbarch = get_regcache_arch (resume_regcache);
CORE_ADDR actual_pc = regcache_read_pc (resume_regcache);
gdb_byte buf[4];
--
1.9.3