* infrun.c (handle_inferior_event): Do not look up regcache

for exited processes.
This commit is contained in:
Ulrich Weigand 2010-02-08 19:50:04 +00:00
parent 3bb8d5c336
commit de0a02497e
2 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2010-02-08 Ulrich Weigand <uweigand@de.ibm.com>
* infrun.c (handle_inferior_event): Do not look up regcache
for exited processes.
Mon Feb 8 13:17:10 2010 Chris Moller <moller@mollerware.com> Mon Feb 8 13:17:10 2010 Chris Moller <moller@mollerware.com>
PR gdb/10728 PR gdb/10728

View File

@ -2664,7 +2664,6 @@ handle_inferior_event (struct execution_control_state *ecs)
{ {
struct frame_info *frame; struct frame_info *frame;
struct gdbarch *gdbarch; struct gdbarch *gdbarch;
struct regcache *regcache;
int sw_single_step_trap_p = 0; int sw_single_step_trap_p = 0;
int stopped_by_watchpoint; int stopped_by_watchpoint;
int stepped_after_stopped_by_watchpoint = 0; int stepped_after_stopped_by_watchpoint = 0;
@ -2735,18 +2734,21 @@ handle_inferior_event (struct execution_control_state *ecs)
non-executable stack. This happens for call dummy breakpoints non-executable stack. This happens for call dummy breakpoints
for architectures like SPARC that place call dummies on the for architectures like SPARC that place call dummies on the
stack. */ stack. */
regcache = get_thread_regcache (ecs->ptid);
if (ecs->ws.kind == TARGET_WAITKIND_STOPPED if (ecs->ws.kind == TARGET_WAITKIND_STOPPED
&& (ecs->ws.value.sig == TARGET_SIGNAL_ILL && (ecs->ws.value.sig == TARGET_SIGNAL_ILL
|| ecs->ws.value.sig == TARGET_SIGNAL_SEGV || ecs->ws.value.sig == TARGET_SIGNAL_SEGV
|| ecs->ws.value.sig == TARGET_SIGNAL_EMT) || ecs->ws.value.sig == TARGET_SIGNAL_EMT))
&& breakpoint_inserted_here_p (get_regcache_aspace (regcache),
regcache_read_pc (regcache)))
{ {
if (debug_infrun) struct regcache *regcache = get_thread_regcache (ecs->ptid);
fprintf_unfiltered (gdb_stdlog,
"infrun: Treating signal as SIGTRAP\n"); if (breakpoint_inserted_here_p (get_regcache_aspace (regcache),
ecs->ws.value.sig = TARGET_SIGNAL_TRAP; regcache_read_pc (regcache)))
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
"infrun: Treating signal as SIGTRAP\n");
ecs->ws.value.sig = TARGET_SIGNAL_TRAP;
}
} }
/* Mark the non-executing threads accordingly. In all-stop, all /* Mark the non-executing threads accordingly. In all-stop, all