Some get_last_target_status tweaks
[deliverable/binutils-gdb.git] / gdb / linux-fork.c
index fe401b2b3b2cac910cb1810a12733de253e88bdb..b15bd3badda5c35d28ea1f297015fd24489a70a7 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code for debugging multiple forks.
 
-   Copyright (C) 2005-2019 Free Software Foundation, Inc.
+   Copyright (C) 2005-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,7 @@
 #include "source.h"
 
 #include "nat/gdb_ptrace.h"
-#include "common/gdb_wait.h"
+#include "gdbsupport/gdb_wait.h"
 #include <dirent.h>
 #include <ctype.h>
 
@@ -215,7 +215,6 @@ call_lseek (int fd, off_t offset, int whence)
 static void
 fork_load_infrun_state (struct fork_info *fp)
 {
-  extern void nullify_last_target_wait_ptid ();
   int i;
 
   linux_nat_switch_fork (fp->ptid);
@@ -427,19 +426,18 @@ public:
     if (m_oldfp != nullptr)
       {
        /* Switch back to inferior_ptid.  */
-       TRY
+       try
          {
            remove_breakpoints ();
            fork_load_infrun_state (m_oldfp);
            insert_breakpoints ();
          }
-       CATCH (ex, RETURN_MASK_ALL)
+       catch (const gdb_exception &ex)
          {
            warning (_("Couldn't restore checkpoint state in %s: %s"),
                     target_pid_to_str (m_oldfp->ptid).c_str (),
                     ex.what ());
          }
-       END_CATCH
       }
   }
 
@@ -598,7 +596,7 @@ info_checkpoints_command (const char *arg, int from_tty)
 
          msym = lookup_minimal_symbol_by_pc (pc);
          if (msym.minsym)
-           printf_filtered (", <%s>", MSYMBOL_LINKAGE_NAME (msym.minsym));
+           printf_filtered (", <%s>", msym.minsym->linkage_name ());
        }
 
       putchar_filtered ('\n');
@@ -766,7 +764,8 @@ Fork a duplicate process (experimental)."));
      process.  */
 
   add_com ("restart", class_obscure, restart_command, _("\
-restart N: restore program context from a checkpoint.\n\
+Restore program context from a checkpoint.\n\
+Usage: restart N\n\
 Argument N is checkpoint ID, as displayed by 'info checkpoints'."));
 
   /* Delete checkpoint command: kill the process and remove it from
This page took 0.026043 seconds and 4 git commands to generate.