bfd macro conversion to inline functions
[deliverable/binutils-gdb.git] / gdb / inferior.h
index f98e67d33f4b8d2e9b82daf1527e3d73199c516e..3a64a7cfeaeaba36d66332cfd421bed657d376b2 100644 (file)
@@ -44,16 +44,16 @@ struct thread_info;
 #include "frame.h"
 
 /* For gdb_environ.  */
-#include "common/environ.h"
+#include "gdbsupport/environ.h"
 
 #include "progspace.h"
 #include "registry.h"
 
 #include "symfile-add-flags.h"
-#include "common/refcounted-object.h"
-#include "common/forward-scope-exit.h"
+#include "gdbsupport/refcounted-object.h"
+#include "gdbsupport/forward-scope-exit.h"
 
-#include "common/common-inferior.h"
+#include "gdbsupport/common-inferior.h"
 #include "gdbthread.h"
 
 struct infcall_suspend_state;
@@ -68,7 +68,18 @@ struct infcall_suspend_state_deleter
 {
   void operator() (struct infcall_suspend_state *state) const
   {
-    restore_infcall_suspend_state (state);
+    try
+      {
+       restore_infcall_suspend_state (state);
+      }
+    catch (const gdb_exception_error &e)
+      {
+       /* If we are restoring the inferior state due to an exception,
+          some error message will be printed.  So, only warn the user
+          when we cannot restore during normal execution.  */
+       if (!std::uncaught_exception ())
+         warning (_("Failed to restore inferior state: %s"), e.what ());
+      }
   }
 };
 
@@ -233,7 +244,7 @@ extern void prepare_execution_command (struct target_ops *target,
 
    The catch-exec traps expected during start-up will be one more if
    the target is started up with a shell.  */
-extern int startup_with_shell;
+extern bool startup_with_shell;
 
 /* Nonzero if stopped due to completion of a stack dummy routine.  */
 
@@ -246,7 +257,7 @@ extern int stopped_by_random_signal;
 
 /* Print notices on inferior events (attach, detach, etc.), set with
    `set print inferior-events'.  */
-extern int print_inferior_events;
+extern bool print_inferior_events;
 
 /* Anything but NO_STOP_QUIETLY means we expect a trap and the caller
    will handle it themselves.  STOP_QUIETLY is used when running in
This page took 0.024084 seconds and 4 git commands to generate.