This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 03/17] Displaced stepping debug: fetch the right regcache


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]