From ad97bfc5332dddb57e0475459f0dfeed5ed8ccfd Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 21 Jul 2020 17:28:16 -0700 Subject: [PATCH] Report architecture-specific signal information for core files. 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 afdaa749f1e..1bd80b6762e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-07-21 John Baldwin + + * corelow.c (core_target_open): Invoke gdbarch report_signal_info + hook if present. + 2020-07-21 John Baldwin * gdbarch.c: Regenerate. diff --git a/gdb/corelow.c b/gdb/corelow.c index b6a12c08181..3958af1e67a 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.30.2