ld: don't use ia64 register name in expression of pr16322 test
[deliverable/binutils-gdb.git] / gdb / corelow.c
index dc22f2ba038d38e4b7689419937d0a8178d43d26..6a67a989f58d1f31109aa1177afb72582a1e477e 100644 (file)
@@ -1,6 +1,6 @@
 /* Core dump and executable file functions below target vector, for GDB.
 
-   Copyright (C) 1986-2014 Free Software Foundation, Inc.
+   Copyright (C) 1986-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -413,7 +413,7 @@ core_open (const char *arg, int from_tty)
      sections.  */
   TRY_CATCH (except, RETURN_MASK_ERROR)
     {
-      target_find_new_threads ();
+      target_update_thread_list ();
     }
 
   if (except.reason < 0)
@@ -456,6 +456,19 @@ core_open (const char *arg, int from_tty)
   /* Now, set up the frame cache, and print the top of stack.  */
   reinit_frame_cache ();
   print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+
+  /* Current thread should be NUM 1 but the user does not know that.
+     If a program is single threaded gdb in general does not mention
+     anything about threads.  That is why the test is >= 2.  */
+  if (thread_count () >= 2)
+    {
+      TRY_CATCH (except, RETURN_MASK_ERROR)
+       {
+         thread_command (NULL, from_tty);
+       }
+      if (except.reason < 0)
+       exception_print (gdb_stderr, except);
+    }
 }
 
 static void
@@ -954,7 +967,7 @@ core_pid_to_str (struct target_ops *ops, ptid_t ptid)
 
   /* Otherwise, this isn't a "threaded" core -- use the PID field, but
      only if it isn't a fake PID.  */
-  inf = find_inferior_pid (ptid_get_pid (ptid));
+  inf = find_inferior_ptid (ptid);
   if (inf != NULL && !inf->fake_pid_p)
     return normal_pid_to_str (ptid);
 
This page took 0.024643 seconds and 4 git commands to generate.