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.