* infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
if the thread has already exited.
This commit is contained in:
parent
e0bb1c1c26
commit
24a73cce8b
2 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
|
||||||
|
if the thread has already exited.
|
||||||
|
|
||||||
2008-08-22 Pedro Alves <pedro@codesourcery.com>
|
2008-08-22 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* infrun.c (proceed): Move back setting previous_inferior_ptid
|
* infrun.c (proceed): Move back setting previous_inferior_ptid
|
||||||
|
|
16
gdb/infrun.c
16
gdb/infrun.c
|
@ -1750,15 +1750,10 @@ context_switch_to (ptid_t ptid)
|
||||||
static void
|
static void
|
||||||
adjust_pc_after_break (struct execution_control_state *ecs)
|
adjust_pc_after_break (struct execution_control_state *ecs)
|
||||||
{
|
{
|
||||||
struct regcache *regcache = get_thread_regcache (ecs->ptid);
|
struct regcache *regcache;
|
||||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
struct gdbarch *gdbarch;
|
||||||
CORE_ADDR breakpoint_pc;
|
CORE_ADDR breakpoint_pc;
|
||||||
|
|
||||||
/* If this target does not decrement the PC after breakpoints, then
|
|
||||||
we have nothing to do. */
|
|
||||||
if (gdbarch_decr_pc_after_break (gdbarch) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* If we've hit a breakpoint, we'll normally be stopped with SIGTRAP. If
|
/* If we've hit a breakpoint, we'll normally be stopped with SIGTRAP. If
|
||||||
we aren't, just return.
|
we aren't, just return.
|
||||||
|
|
||||||
|
@ -1786,6 +1781,13 @@ adjust_pc_after_break (struct execution_control_state *ecs)
|
||||||
if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
|
if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* If this target does not decrement the PC after breakpoints, then
|
||||||
|
we have nothing to do. */
|
||||||
|
regcache = get_thread_regcache (ecs->ptid);
|
||||||
|
gdbarch = get_regcache_arch (regcache);
|
||||||
|
if (gdbarch_decr_pc_after_break (gdbarch) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Find the location where (if we've hit a breakpoint) the
|
/* Find the location where (if we've hit a breakpoint) the
|
||||||
breakpoint would be. */
|
breakpoint would be. */
|
||||||
breakpoint_pc = regcache_read_pc (regcache)
|
breakpoint_pc = regcache_read_pc (regcache)
|
||||||
|
|
Loading…
Reference in a new issue