diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/infrun.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f240754..ea65327 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-04-29 Simon Marchi <simon.marchi@polymtl.ca> + + * infrun.c (save_waitstatus): Move variables to inner scope. + 2021-04-29 Andrew Burgess <andrew.burgess@embecosm.com> * NEWS: Fix typo and stray full stop. diff --git a/gdb/infrun.c b/gdb/infrun.c index cfec079..90bab8d 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4703,12 +4703,11 @@ save_waitstatus (struct thread_info *tp, const target_waitstatus *ws) tp->suspend.waitstatus = *ws; tp->suspend.waitstatus_pending_p = 1; - struct regcache *regcache = get_thread_regcache (tp); - const address_space *aspace = regcache->aspace (); - if (ws->kind == TARGET_WAITKIND_STOPPED && ws->value.sig == GDB_SIGNAL_TRAP) { + struct regcache *regcache = get_thread_regcache (tp); + const address_space *aspace = regcache->aspace (); CORE_ADDR pc = regcache_read_pc (regcache); adjust_pc_after_break (tp, &tp->suspend.waitstatus); |