diff options
author | Pedro Alves <palves@redhat.com> | 2009-05-17 16:31:21 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-05-17 16:31:21 +0000 |
commit | 71b43ef89ec88b7ca60a19cf70be704555ebd348 (patch) | |
tree | be2339730ad48e260e5554e1177c31ff0c47a0f6 | |
parent | ed20019d73a315e26504cfc65a58eaa03afec42a (diff) | |
download | fsf-binutils-gdb-71b43ef89ec88b7ca60a19cf70be704555ebd348.zip fsf-binutils-gdb-71b43ef89ec88b7ca60a19cf70be704555ebd348.tar.gz fsf-binutils-gdb-71b43ef89ec88b7ca60a19cf70be704555ebd348.tar.bz2 |
* infrun.c (pending_follow): Remove execd_pathname member.
(resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
(handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
event, don't copy `execd_pathname' to pending_follow, use the
event copy instead. Release `execd_pathname' once done with
handling the event.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/infrun.c | 17 |
2 files changed, 15 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc18ad4..528fbef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2009-05-17 Pedro Alves <pedro@codesourcery.com> + + * infrun.c (pending_follow): Remove execd_pathname member. + (resume): No longer handle TARGET_WAITKIND_EXECD pending follow. + (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD + event, don't copy `execd_pathname' to pending_follow, use the + event copy instead. Release `execd_pathname' once done with + handling the event. + 2009-05-17 Hui Zhu <teawater@gmail.com> * i386-tdep.c (i386_process_record): Make it extern. diff --git a/gdb/infrun.c b/gdb/infrun.c index 903f31c..526112f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -268,7 +268,6 @@ static struct ptid_t child_pid; } fork_event; - char *execd_pathname; } pending_follow; @@ -1078,11 +1077,6 @@ a command like `return' or `jump' to continue execution.")); pc = regcache_read_pc (regcache); break; - case TARGET_WAITKIND_EXECD: - /* follow_exec is called as soon as the exec event is seen. */ - pending_follow.kind = TARGET_WAITKIND_SPURIOUS; - break; - default: break; } @@ -2444,9 +2438,6 @@ handle_inferior_event (struct execution_control_state *ecs) case TARGET_WAITKIND_EXECD: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXECD\n"); - pending_follow.execd_pathname = - savestring (ecs->ws.value.execd_pathname, - strlen (ecs->ws.value.execd_pathname)); if (!ptid_equal (ecs->ptid, inferior_ptid)) { @@ -2459,12 +2450,16 @@ handle_inferior_event (struct execution_control_state *ecs) /* This causes the eventpoints and symbol table to be reset. Must do this now, before trying to determine whether to stop. */ - follow_exec (inferior_ptid, pending_follow.execd_pathname); - xfree (pending_follow.execd_pathname); + follow_exec (inferior_ptid, ecs->ws.value.execd_pathname); ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid); ecs->random_signal = !bpstat_explains_signal (ecs->event_thread->stop_bpstat); + /* Note that this may be referenced from inside + bpstat_stop_status above, through inferior_has_execd. */ + xfree (ecs->ws.value.execd_pathname); + ecs->ws.value.execd_pathname = NULL; + /* If no catchpoint triggered for this, then keep going. */ if (ecs->random_signal) { |