aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 1b4aa9d..02997c7 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1187,6 +1187,9 @@ kill_or_detach (struct inferior *inf, void *args)
struct qt_args *qt = args;
struct thread_info *thread;
+ if (inf->pid == 0)
+ return 0;
+
thread = any_thread_of_process (inf->pid);
if (thread != NULL)
{
@@ -1214,6 +1217,9 @@ print_inferior_quit_action (struct inferior *inf, void *arg)
{
struct ui_file *stb = arg;
+ if (inf->pid == 0)
+ return 0;
+
if (inf->attach_flag)
fprintf_filtered (stb,
_("\tInferior %d [%s] will be detached.\n"), inf->num,
@@ -1721,6 +1727,13 @@ gdb_init (char *argv0)
initialize_targets (); /* Setup target_terminal macros for utils.c */
initialize_utils (); /* Make errors and warnings possible */
initialize_all_files ();
+ /* This creates the current_program_space. Do this after all the
+ _initialize_foo routines have had a chance to install their
+ per-sspace data keys. Also do this before
+ initialize_current_architecture is called, because it accesses
+ exec_bfd of the current program space. */
+ initialize_progspace ();
+ initialize_inferiors ();
initialize_current_architecture ();
init_cli_cmds();
init_main (); /* But that omits this file! Do it now */