aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-07-21 17:28:16 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2020-07-21 17:28:16 -0700
commit272bb05cc59ccfbb15f9e496d4d2ec243e08473c (patch)
tree9ee0e68b116b3ddc274dc9c2f01ab593d4df703b /gdb/gdbarch.h
parent98f5f7740a4bb7c09e4e3f934f8fd8be47bfbbc8 (diff)
downloadfsf-binutils-gdb-272bb05cc59ccfbb15f9e496d4d2ec243e08473c.zip
fsf-binutils-gdb-272bb05cc59ccfbb15f9e496d4d2ec243e08473c.tar.gz
fsf-binutils-gdb-272bb05cc59ccfbb15f9e496d4d2ec243e08473c.tar.bz2
Add a new gdbarch hook to report additional signal information.
This is a more general version of the existing handle_segmentation_fault hook that is able to report information for an arbitrary signal, not just SIGSEGV. gdb/ChangeLog: * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (report_signal_info): New method. * infrun.c (print_signal_received_reason): Invoke gdbarch report_signal_info hook if present.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0940156..9414407 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -332,6 +332,16 @@ typedef void (gdbarch_handle_segmentation_fault_ftype) (struct gdbarch *gdbarch,
extern void gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout);
extern void set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault);
+/* Some architectures can display additional information for specific
+ signals.
+ UIOUT is the output stream where the handler will place information. */
+
+extern int gdbarch_report_signal_info_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_report_signal_info_ftype) (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal);
+extern void gdbarch_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal);
+extern void set_gdbarch_report_signal_info (struct gdbarch *gdbarch, gdbarch_report_signal_info_ftype *report_signal_info);
+
/* GDB's standard (or well known) register numbers. These can map onto
a real register or a pseudo (computed) register or not be defined at
all (-1).