Rename common to gdbsupport
[deliverable/binutils-gdb.git] / gdb / inferior.h
index f98e67d33f4b8d2e9b82daf1527e3d73199c516e..9cfb03cdbb38eb63220cf16ff68729c1d04e24c8 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 ());
+      }
   }
 };
 
This page took 0.025512 seconds and 4 git commands to generate.