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.
This commit is contained in:
parent
98f5f7740a
commit
272bb05cc5
5 changed files with 60 additions and 0 deletions
|
@ -8299,6 +8299,11 @@ print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal)
|
|||
annotate_signal_string ();
|
||||
uiout->field_string ("signal-meaning", gdb_signal_to_string (siggnal));
|
||||
|
||||
struct regcache *regcache = get_current_regcache ();
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
if (gdbarch_report_signal_info_p (gdbarch))
|
||||
gdbarch_report_signal_info (gdbarch, uiout, siggnal);
|
||||
|
||||
if (siggnal == GDB_SIGNAL_SEGV)
|
||||
handle_segmentation_fault (uiout);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue