diff options
author | Pedro Alves <palves@redhat.com> | 2008-09-22 15:16:51 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-09-22 15:16:51 +0000 |
commit | 7f9f62ba187205cd123fd2e96909e6d19ad708eb (patch) | |
tree | 1580fd0c5e8c56ec5a6c873101b33cc4f1962e14 /gdb/corelow.c | |
parent | b77209e0003218790c76f67c5ee3e5802168ecaa (diff) | |
download | fsf-binutils-gdb-7f9f62ba187205cd123fd2e96909e6d19ad708eb.zip fsf-binutils-gdb-7f9f62ba187205cd123fd2e96909e6d19ad708eb.tar.gz fsf-binutils-gdb-7f9f62ba187205cd123fd2e96909e6d19ad708eb.tar.bz2 |
* gnu-nat.c (gnu_attach): Add process to inferiors table.
(gnu_detach): Remove it.
* go32-nat.c (go32_create_inferior): Add process to gdb's inferior
table.
* inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors
to inferior table accordingly.
(inf_ptrace_attach): Add new process to inferior table.
(inf_ptrace_detach): Remove it.
* inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors
to inferior table accordingly.
(inf_ttrace_attach): Add process to inferior table.
(inf_ttrace_detach): Remove it.
* linux-fork.c (init_fork_list): Delete any left over inferior.
(linux_fork_mourn_inferior, detach_fork_command): Also delete
processes from inferior list.
* monitor.c (monitor_open): Add process to inferior list.
(monitor_close): Remove it.
* nto-procfs.c (procfs_attach): Add process to inferior list.
Find threads after pushing the target.
(procfs_detach): Remove process from inferior list.
(procfs_create_inferior): Add process to inferior list.
* procfs.c (procfs_detach): Remove process from inferior list.
(do_attach): Add process to inferior list.
* remote-sim.c (sim_create_inferior): Add process to inferior list.
(gdbsim_close): Remove it.
* target.c (generic_mourn_inferior): If inferior_ptid is not
null_ptid, remove the corresponding inferior from inferior list.
* win32-nat.c (do_initial_win32_stuff): Add process to inferior list.
(win32_detach): Remove it.
* linux-nat.c (linux_child_follow_fork): Delete and add inferiors
to inferior list accordingly.
* fork-child.c (fork_inferior): Add process to inferior list.
* corelow.c (CORELOW_PID): Define.
(core_close): Remove core from inferior list.
(core_open): Add it.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r-- | gdb/corelow.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c index 2f2e0f5..14868e2 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -93,6 +93,9 @@ void _initialize_corelow (void); struct target_ops core_ops; +/* An arbitrary identifier for the core inferior. */ +#define CORELOW_PID 1 + /* Link a new core_fns into the global core_file_fns list. Called on gdb startup by the _initialize routine in each core file register reader, to register information about each format the the reader is prepared to @@ -197,6 +200,7 @@ core_close (int quitting) if (core_bfd) { inferior_ptid = null_ptid; /* Avoid confusion from thread stuff */ + delete_inferior_silent (CORELOW_PID); /* Clear out solib state while the bfd is still open. See comments in clear_solib in solib.c. */ @@ -270,8 +274,7 @@ core_open (char *filename, int from_tty) bfd *temp_bfd; int scratch_chan; int flags; - /* An arbitrary identifier for the core inferior. */ - int corelow_pid = 1; + int corelow_pid = CORELOW_PID; target_preopen (from_tty); if (!filename) @@ -355,6 +358,8 @@ core_open (char *filename, int from_tty) push_target (&core_ops); discard_cleanups (old_chain); + add_inferior_silent (corelow_pid); + /* Do this before acknowledging the inferior, so if post_create_inferior throws (can happen easilly if you're loading a core file with the wrong exec), we aren't left with threads |