diff options
author | Tom Tromey <tromey@adacore.com> | 2021-09-28 13:13:06 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-09-30 11:17:09 -0600 |
commit | 9279eb5c2c4421329822186ed86b48faa9d310e6 (patch) | |
tree | af22e8c8d6e95e7659eaa20e8c933090999d9578 | |
parent | 7264ba83317a0cdb8ffd9e07dda7892bf0f6fcf2 (diff) | |
download | gdb-9279eb5c2c4421329822186ed86b48faa9d310e6.zip gdb-9279eb5c2c4421329822186ed86b48faa9d310e6.tar.gz gdb-9279eb5c2c4421329822186ed86b48faa9d310e6.tar.bz2 |
Fix Windows crash from stop_pc change
The "make thread_suspend_state::stop_pc optional" patch caused a
regression on Windows when using shared libraries. I tracked this
down to an unguarded use of stop_pc() in the TARGET_WAITKIND_LOADED
case of handle_inferior_event. This patch fixes the bug by ensuring
that the stop PC is set at this point.
-rw-r--r-- | gdb/infrun.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 5fd1ade..af552e0 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5283,6 +5283,7 @@ handle_inferior_event (struct execution_control_state *ecs) handle_solib_event (); + ecs->event_thread->set_stop_pc (regcache_read_pc (regcache)); ecs->event_thread->control.stop_bpstat = bpstat_stop_status (regcache->aspace (), ecs->event_thread->stop_pc (), |