base: improve gdb exception information

Even it is an unknow exception for GDB, we still can try to cast it
to std::exception and print some information from `what()`.

Change-Id: Ie0cdc978eb1b3e130bc2153eae99025dcd0109f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48825
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Yu-hsin Wang
2021-07-29 16:07:27 +08:00
parent 29e3e03a97
commit 636d0c3745

View File

@@ -557,6 +557,8 @@ BaseRemoteGDB::trap(ContextID id, int signum)
send("");
} catch (CmdError &e) {
send(e.error);
} catch (std::exception &e) {
panic("Unrecognzied GDB exception: %s", e.what());
} catch (...) {
panic("Unrecognzied GDB exception.");
}