#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;
{
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 ());
+ }
}
};