2002-11-29 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / corelow.c
index 657cdc8ffc9d0b34342f95a4317adf6a3c6f48e0..8b172b7d9c3e23f59e3ae39747515e2e4e289234 100644 (file)
@@ -321,7 +321,12 @@ core_open (char *filename, int from_tty)
     error ("\"%s\": Can't find sections: %s",
           bfd_get_filename (core_bfd), bfd_errmsg (bfd_get_error ()));
 
-  set_gdbarch_from_file (core_bfd);
+  /* If we have no exec file, try to set the architecture from the
+     core file.  We don't do this unconditionally since an exec file
+     typically contains more information that helps us determine the
+     architecture than a core file.  */
+  if (!exec_bfd)
+    set_gdbarch_from_file (core_bfd);
 
   ontop = !push_target (&core_ops);
   discard_cleanups (old_chain);
@@ -359,8 +364,8 @@ core_open (char *filename, int from_tty)
       /* Now, set up the frame cache, and print the top of stack.  */
       flush_cached_frames ();
       select_frame (get_current_frame ());
-      print_stack_frame (selected_frame,
-                        frame_relative_level (selected_frame), 1);
+      print_stack_frame (deprecated_selected_frame,
+                        frame_relative_level (deprecated_selected_frame), 1);
     }
   else
     {
@@ -461,7 +466,7 @@ get_core_registers (int regno)
   get_core_register_section (".reg2", 2, "floating-point", 0);
   get_core_register_section (".reg-xfp", 3, "extended floating-point", 0);
 
-  registers_fetched ();
+  deprecated_registers_fetched ();
 }
 
 static void
@@ -513,7 +518,6 @@ init_core_ops (void)
   core_ops.to_insert_breakpoint = ignore;
   core_ops.to_remove_breakpoint = ignore;
   core_ops.to_create_inferior = find_default_create_inferior;
-  core_ops.to_clone_and_follow_inferior = find_default_clone_and_follow_inferior;
   core_ops.to_thread_alive = core_file_thread_alive;
   core_ops.to_stratum = core_stratum;
   core_ops.to_has_memory = 1;
This page took 0.024789 seconds and 4 git commands to generate.