Report architecture-specific signal information for core files.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 22 Jul 2020 00:28:16 +0000 (17:28 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 22 Jul 2020 00:28:16 +0000 (17:28 -0700)
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
gdb/corelow.c

index afdaa749f1ef26c930a6845d199554c74485314c..1bd80b6762e33fd70ed38cd5a5643420cc9a7f1d 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-21  John Baldwin  <jhb@FreeBSD.org>
+
+       * corelow.c (core_target_open): Invoke gdbarch report_signal_info
+       hook if present.
+
 2020-07-21  John Baldwin  <jhb@FreeBSD.org>
 
        * gdbarch.c: Regenerate.
index b6a12c0818150fbb831a61c33df36dce43c3714d..3958af1e67a68a5284df5d4c92085ce79dc19b6c 100644 (file)
@@ -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.  */