Rely on std::uncaught_exceptions
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
std::uncaught_exceptions is a C++17 feature, so I think we can remove
this conditional code from inferior.h.
---
gdb/inferior.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
@@ -86,13 +86,7 @@ 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. */
- bool unwinding;
-#if __cpp_lib_uncaught_exceptions
- unwinding = std::uncaught_exceptions () > 0;
-#else
- unwinding = std::uncaught_exception ();
-#endif
- if (!unwinding)
+ if (std::uncaught_exceptions () == 0)
warning (_("Failed to restore inferior state: %s"), e.what ());
}
}