Add an objfile getter to gdb.Type
[deliverable/binutils-gdb.git] / gdb / inferior.h
index 276c442746ab120f1b7ff8058bcff5be55777f6d..9e0e3b30e882b061d42deb291d926acca552e3a6 100644 (file)
@@ -44,15 +44,16 @@ struct thread_info;
 #include "frame.h"
 
 /* For gdb_environ.  */
-#include "environ.h"
+#include "common/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 "common-inferior.h"
+#include "common/common-inferior.h"
 #include "gdbthread.h"
 
 struct infcall_suspend_state;
@@ -67,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 ());
+      }
   }
 };
 
@@ -198,7 +210,8 @@ extern void continue_1 (int all_threads);
 
 extern void interrupt_target_1 (int all_threads);
 
-extern void delete_longjmp_breakpoint_cleanup (void *arg);
+using delete_longjmp_breakpoint_cleanup
+  = FORWARD_SCOPE_EXIT (delete_longjmp_breakpoint);
 
 extern void detach_command (const char *, int);
 
@@ -333,7 +346,7 @@ extern void set_current_inferior (inferior *);
    the inferior object's refcount, to prevent something deleting the
    inferior object before reverting back (e.g., due to a
    "remove-inferiors" command (see
-   make_cleanup_restore_current_thread).  All other inferior
+   scoped_restore_current_inferior).  All other inferior
    references are considered weak references.  Inferiors are always
    listed exactly once in the inferior list, so placing an inferior in
    the inferior list is an implicit, not counted strong reference.  */
@@ -503,6 +516,9 @@ public:
      this gdbarch.  */
   struct gdbarch *gdbarch = NULL;
 
+  /* Data related to displaced stepping.  */
+  displaced_step_inferior_state displaced_step_state;
+
   /* Per inferior data-pointers required by other GDB modules.  */
   REGISTRY_FIELDS;
 };
This page took 0.024466 seconds and 4 git commands to generate.