*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / top.c
index 1b4aa9d1af8f236e384f846691be75125b057a9f..02997c722e16b851e63d584cba8e53b8fc77cbff 100644 (file)
--- 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 */
This page took 0.025098 seconds and 4 git commands to generate.