From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/5] Migrate the sparc64 ADI handle_segmentation_fault hook to report_signal_info.
Date: Fri, 17 Jul 2020 15:03:09 -0700 [thread overview]
Message-ID: <20200717220310.82230-5-jhb@FreeBSD.org> (raw)
In-Reply-To: <20200717220310.82230-1-jhb@FreeBSD.org>
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 | 8 ++++++++
gdb/sparc64-linux-tdep.c | 12 ++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ae5ee27a11..ca7a27180e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2020-07-17 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-17 John Baldwin <jhb@FreeBSD.org>
* amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index a7f439fbb0..9a73ca1b04 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -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 ();
--
2.25.1
next prev parent reply other threads:[~2020-07-17 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 22:03 [PATCH 0/5] Genericize gdbarch_handle_segmentation_fault John Baldwin
2020-07-17 22:03 ` [PATCH 1/5] Add a new gdbarch hook to report additional signal information John Baldwin
2020-07-17 22:03 ` [PATCH 2/5] Report architecture-specific signal information for core files John Baldwin
2020-07-17 22:03 ` [PATCH 3/5] Migrate the x86 MPX handle_segmentation_fault hook to report_signal_info John Baldwin
2020-07-17 22:03 ` John Baldwin [this message]
2020-07-17 22:03 ` [PATCH 5/5] Retire the now-unused gdbarch handle_segmentation_fault hook John Baldwin
2020-07-21 18:40 ` [PATCH 0/5] Genericize gdbarch_handle_segmentation_fault Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200717220310.82230-5-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).