aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-02-08 19:50:04 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-02-08 19:50:04 +0000
commitde0a02497e91b8f887be102a876f388dcc9f58e6 (patch)
treef2020f6c5aaa879d2182088f5c1a2f792bb6c318 /gdb/infrun.c
parent3bb8d5c3362294ff8e48eeed986801a1b2bbe81f (diff)
downloadgdb-de0a02497e91b8f887be102a876f388dcc9f58e6.zip
gdb-de0a02497e91b8f887be102a876f388dcc9f58e6.tar.gz
gdb-de0a02497e91b8f887be102a876f388dcc9f58e6.tar.bz2
* infrun.c (handle_inferior_event): Do not look up regcache
for exited processes.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 8307986..a715596 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2664,7 +2664,6 @@ handle_inferior_event (struct execution_control_state *ecs)
{
struct frame_info *frame;
struct gdbarch *gdbarch;
- struct regcache *regcache;
int sw_single_step_trap_p = 0;
int stopped_by_watchpoint;
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
for architectures like SPARC that place call dummies on the
stack. */
- regcache = get_thread_regcache (ecs->ptid);
if (ecs->ws.kind == TARGET_WAITKIND_STOPPED
&& (ecs->ws.value.sig == TARGET_SIGNAL_ILL
|| ecs->ws.value.sig == TARGET_SIGNAL_SEGV
- || ecs->ws.value.sig == TARGET_SIGNAL_EMT)
- && breakpoint_inserted_here_p (get_regcache_aspace (regcache),
- regcache_read_pc (regcache)))
+ || ecs->ws.value.sig == TARGET_SIGNAL_EMT))
{
- if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog,
- "infrun: Treating signal as SIGTRAP\n");
- ecs->ws.value.sig = TARGET_SIGNAL_TRAP;
+ struct regcache *regcache = get_thread_regcache (ecs->ptid);
+
+ if (breakpoint_inserted_here_p (get_regcache_aspace (regcache),
+ 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