daily update
[deliverable/binutils-gdb.git] / gdb / linux-tdep.c
index 07fd67c887d1c1b22de73356d4ccbfa173d7b31d..004451e5c1afb860b16e69f4c3c3387b4f0b3c56 100644 (file)
@@ -23,6 +23,7 @@
 #include "auxv.h"
 #include "target.h"
 #include "elf/common.h"
+#include "inferior.h"
 
 /* This function is suitable for architectures that don't
    extend/override the standard siginfo structure.  */
@@ -152,3 +153,28 @@ linux_has_shared_address_space (void)
 
   return target_is_uclinux;
 }
+
+/* This is how we want PTIDs from core files to be printed.  */
+
+static char *
+linux_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
+{
+  static char buf[80];
+
+  if (ptid_get_lwp (ptid) != 0)
+    {
+      snprintf (buf, sizeof (buf), "LWP %ld", ptid_get_lwp (ptid));
+      return buf;
+    }
+
+  return normal_pid_to_str (ptid);
+}
+
+/* To be called from the various GDB_OSABI_LINUX handlers for the
+   various GNU/Linux architectures and machine types.  */
+
+void
+linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  set_gdbarch_core_pid_to_str (gdbarch, linux_core_pid_to_str);
+}
This page took 0.023713 seconds and 4 git commands to generate.