diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/inferior.h | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8178e16..21dc3e2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2020-07-05 Tom de Vries <tdevries@suse.de> + + PR build/26187 + * inferior.h (struct infcall_suspend_state_deleter): If available, use + std::uncaught_exceptions instead of deprecated + std::uncaught_exception. + 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca> * macroexp.h (macro_stringify): Return diff --git a/gdb/inferior.h b/gdb/inferior.h index 572c5f3..606cece 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -21,6 +21,8 @@ #if !defined (INFERIOR_H) #define INFERIOR_H 1 +#include <exception> + struct target_waitstatus; struct frame_info; struct ui_file; @@ -80,7 +82,13 @@ struct infcall_suspend_state_deleter /* 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 ()) + bool unwinding; +#if __cpp_lib_uncaught_exceptions + unwinding = std::uncaught_exceptions () > 0; +#else + unwinding = std::uncaught_exception (); +#endif + if (!unwinding) warning (_("Failed to restore inferior state: %s"), e.what ()); } } |