[PATCH 2/5] Report architecture-specific signal information for core files.
John Baldwin
jhb@FreeBSD.org
Fri Jul 17 22:03:07 GMT 2020
When opening a core file, if the process terminated due to a signal,
invoke the gdbarch report_signal_info hook to report
architecture-specific information about the signal.
gdb/ChangeLog:
* corelow.c (core_target_open): Invoke gdbarch report_signal_info
hook if present.
---
gdb/ChangeLog | 5 +++++
gdb/corelow.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 145a5dd2c2..a18e8d8993 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-17 John Baldwin <jhb@FreeBSD.org>
+
+ * corelow.c (core_target_open): Invoke gdbarch report_signal_info
+ hook if present.
+
2020-07-17 John Baldwin <jhb@FreeBSD.org>
* gdbarch.c: Regenerate.
diff --git a/gdb/corelow.c b/gdb/corelow.c
index b6a12c0818..3958af1e67 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -416,8 +416,11 @@ core_target_open (const char *arg, int from_tty)
siggy)
: gdb_signal_from_host (siggy));
- printf_filtered (_("Program terminated with signal %s, %s.\n"),
+ printf_filtered (_("Program terminated with signal %s, %s"),
gdb_signal_to_name (sig), gdb_signal_to_string (sig));
+ if (gdbarch_report_signal_info_p (core_gdbarch))
+ gdbarch_report_signal_info (core_gdbarch, current_uiout, sig);
+ printf_filtered (_(".\n"));
/* Set the value of the internal variable $_exitsignal,
which holds the signal uncaught by the inferior. */
--
2.25.1
More information about the Gdb-patches
mailing list