aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-22 15:26:53 +0000
committerPedro Alves <palves@redhat.com>2008-09-22 15:26:53 +0000
commit6ca15a4b218da0eb45fd099f8662a0c3388b7eda (patch)
tree5a7e7010027eb6162042e0717f0ed77b2f70437b /gdb
parent795e548fb82c76d22dff382dfc99e121ad0f0167 (diff)
downloadgdb-6ca15a4b218da0eb45fd099f8662a0c3388b7eda.zip
gdb-6ca15a4b218da0eb45fd099f8662a0c3388b7eda.tar.gz
gdb-6ca15a4b218da0eb45fd099f8662a0c3388b7eda.tar.bz2
* infrun.c (follow_exec): Don't do a generic mourn. Instead
inline the required bits. * breakpoint.h (enum inf_context): Add inf_execd.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/breakpoint.h3
-rw-r--r--gdb/infrun.c6
3 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 358cca7..e0b3683 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2008-09-22 Pedro Alves <pedro@codesourcery.com>
+ * infrun.c (follow_exec): Don't do a generic mourn. Instead
+ inline the required bits.
+ * breakpoint.h (enum inf_context): Add inf_execd.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
* infrun.c (handle_inferior_event): In the follow exec case,
context-switch before doing anything else.
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 8bafc93..db6e972 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -663,7 +663,8 @@ enum inf_context
{
inf_starting,
inf_running,
- inf_exited
+ inf_exited,
+ inf_execd
};
/* The possible return values for breakpoint_here_p.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3331152..4b4df8f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -331,7 +331,6 @@ follow_inferior_reset_breakpoints (void)
static void
follow_exec (ptid_t pid, char *execd_pathname)
{
- ptid_t saved_pid = pid;
struct target_ops *tgt;
struct thread_info *th = inferior_thread ();
@@ -370,9 +369,8 @@ follow_exec (ptid_t pid, char *execd_pathname)
inferior has essentially been killed & reborn. */
gdb_flush (gdb_stdout);
- generic_mourn_inferior ();
- /* Because mourn_inferior resets inferior_ptid. */
- inferior_ptid = saved_pid;
+
+ breakpoint_init_inferior (inf_execd);
if (gdb_sysroot && *gdb_sysroot)
{