Migrate the sparc64 ADI handle_segmentation_fault hook to report_signal_info.
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)
gdb/ChangeLog:

* sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
Rename to sparc64_linux_report_signal_info and add siggnal
argument.
(sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
instead of sparc64_linux_handle_segmentation_fault.

gdb/ChangeLog
gdb/sparc64-linux-tdep.c

index edb2cb72685a0fb7cc67a6b49d3c4e8a828e0f6a..c06471ef6422de031ae58ebd0b2f65befed952ef 100644 (file)
@@ -1,3 +1,11 @@
+2020-07-21  John Baldwin  <jhb@FreeBSD.org>
+
+       * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
+       Rename to sparc64_linux_report_signal_info and add siggnal
+       argument.
+       (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
+       instead of sparc64_linux_handle_segmentation_fault.
+
 2020-07-21  John Baldwin  <jhb@FreeBSD.org>
 
        * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
index a7f439fbb04dcc001181b719ac2f94ffa0f310e2..9a73ca1b04eb2b1fe92873322144bfd7a7089237 100644 (file)
@@ -116,15 +116,16 @@ sparc64_linux_sigframe_init (const struct tramp_frame *self,
   trad_frame_set_id (this_cache, frame_id_build (base, func));
 }
 
-/* sparc64 GNU/Linux implementation of the handle_segmentation_fault
+/* sparc64 GNU/Linux implementation of the report_signal_info
    gdbarch hook.
    Displays information related to ADI memory corruptions.  */
 
 static void
-sparc64_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
-                                     struct ui_out *uiout)
+sparc64_linux_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout,
+                                 enum gdb_signal siggnal)
 {
-  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word != 64)
+  if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word != 64
+      || siggnal != GDB_SIGNAL_SEGV)
     return;
 
   CORE_ADDR addr = 0;
@@ -404,8 +405,7 @@ sparc64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_SPARC64);
   set_gdbarch_get_syscall_number (gdbarch,
                                   sparc64_linux_get_syscall_number);
-  set_gdbarch_handle_segmentation_fault (gdbarch,
-                                        sparc64_linux_handle_segmentation_fault);
+  set_gdbarch_report_signal_info (gdbarch, sparc64_linux_report_signal_info);
 }
 
 void _initialize_sparc64_linux_tdep ();