aboutsummaryrefslogtreecommitdiff
path: root/gdb/arc-tdep.h
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2016-08-22 19:39:46 +0300
committerShahab Vahedi <shahab@synopsys.com>2020-12-22 12:04:31 +0100
commitb4e3cd0440109d0a5552d3313ccbd35c8103335b (patch)
tree3db267f0f65f031b5912f6814bc7741758056024 /gdb/arc-tdep.h
parent6bf6909bf4987cb8b44e3c27e377c377294f0f19 (diff)
downloadgdb-b4e3cd0440109d0a5552d3313ccbd35c8103335b.zip
gdb-b4e3cd0440109d0a5552d3313ccbd35c8103335b.tar.gz
gdb-b4e3cd0440109d0a5552d3313ccbd35c8103335b.tar.bz2
arc: Add support for signal handlers
This patch adds the necessary infrastructure to handle signal frames for ARC architecture. It is fairly similar to what any other architecture would have. Linux specific parts will be in a separate patch. v2 [1]: - Make the logic of "arc_sigtramp_frame_sniffer ()" simpler. [1] Tom's remark for the first version https://sourceware.org/pipermail/gdb-patches/2020-November/173221.html gdb/ChangeLog: * arc-tdep.c (arc_make_sigtramp_frame_cache): New function. (arc_sigtramp_frame_this_id): Likewise. (arc_sigtramp_frame_prev_register): Likewise. (arc_sigtramp_frame_sniffer): Likewise. (arc_siftramp_frame_unwind): New global variable. (arc_gdbarch_init): Use sigtramp capabilities. (arc_dump_tdep): Print sigtramp fields. * arc-tdep.h (gdbarch_tdep): Add sigtramp fields.
Diffstat (limited to 'gdb/arc-tdep.h')
-rw-r--r--gdb/arc-tdep.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h
index 09fcbea..5ee5cf8 100644
--- a/gdb/arc-tdep.h
+++ b/gdb/arc-tdep.h
@@ -124,6 +124,19 @@ struct gdbarch_tdep
/* Whether target has hardware (aka zero-delay) loops. */
bool has_hw_loops;
+
+ /* Detect sigtramp. */
+ bool (*is_sigtramp) (struct frame_info *);
+
+ /* Get address of sigcontext for sigtramp. */
+ CORE_ADDR (*sigcontext_addr) (struct frame_info *);
+
+ /* Offset of registers in `struct sigcontext'. */
+ const int *sc_reg_offset;
+
+ /* Number of registers in sc_reg_offsets. Most likely a ARC_LAST_REGNUM,
+ but in theory it could be less, so it is kept separate. */
+ int sc_num_regs;
};
/* Utility functions used by other ARC-specific modules. */