aboutsummaryrefslogtreecommitdiff
path: root/gdb/arc-tdep.h
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2017-01-30 18:32:10 +0300
committerShahab Vahedi <shahab@synopsys.com>2020-10-07 18:08:56 +0200
commitcc463201c4bbe5d0708ef4b45b17fb7c3fed6aee (patch)
tree0c77080c27a27c9b3f02a506734b3709a1ee5859 /gdb/arc-tdep.h
parent6d2d7c5668f99d1fe9a8da643a43c824b104b337 (diff)
downloadgdb-cc463201c4bbe5d0708ef4b45b17fb7c3fed6aee.zip
gdb-cc463201c4bbe5d0708ef4b45b17fb7c3fed6aee.tar.gz
gdb-cc463201c4bbe5d0708ef4b45b17fb7c3fed6aee.tar.bz2
arc: Add support for Linux coredump files
With the implemenations in this patch, ARC gdb can handle coredump related matters. The binutils counter part of this patch has already been pushed [1]. v2 [2]: - arc_linux_collect_gregset: Use "reg <= ARC_LAST_REGNUM" instead of "reg < ARC_LAST_REGNUM" for the condition check of the for-loop. - arc-linux-tdep.c: Use "ARC_LAST_REGNUM < ARRAY_SIZE (...)" instead of "ARC_LAST_REGNUM <= ARRAY_SIZE (...)" for the "asserts". - Use "buf + arc_linux_core_reg_offsets[ARC_ERET_REGNUM]" instead of "buf + REG_OFF (6)". - Fix a few typos/indentation. v3 [3]: - Use gdb_assert_not_reached(text) instead of gdb_assert (!text). - Remove unnecessary braces in the for loop. [1] arc: Add support for ARC HS extra registers in core files https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2745674244d6aecddcf636475034bdb9c0a6b4a0 [2] First remarks https://sourceware.org/pipermail/gdb-patches/2020-September/171912.html [3] Second remarks https://sourceware.org/pipermail/gdb-patches/2020-October/172302.html gdb/ChangeLog: * arc-linux-tdep.h: New file. * arc-linux-tdep.c (arc_linux_core_reg_offsets, arc_linux_supply_gregset, arc_linux_supply_v2_regset, arc_linux_collect_gregset, arc_linux_collect_v2_regset, arc_linux_gregset, arc_linux_v2_regset, arc_linux_iterate_over_regset_sections, arc_linux_core_read_description): Implement. (arc_linux_init_osabi): Set iterate_over_regset_sections. * arc-tdep.h (ARC_OFFSET_NO_REGISTER): Declare. (arc_gdbarch_features_create): Add. * arc-tdep.c (arc_gdbarch_features_create): Not static anymore.
Diffstat (limited to 'gdb/arc-tdep.h')
-rw-r--r--gdb/arc-tdep.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h
index 6331d29..09fcbea 100644
--- a/gdb/arc-tdep.h
+++ b/gdb/arc-tdep.h
@@ -85,7 +85,9 @@ enum arc_regnum
ARC_LP_END_REGNUM,
/* Branch target address. */
ARC_BTA_REGNUM,
- ARC_LAST_AUX_REGNUM = ARC_BTA_REGNUM,
+ /* Exception return address. */
+ ARC_ERET_REGNUM,
+ ARC_LAST_AUX_REGNUM = ARC_ERET_REGNUM,
ARC_LAST_REGNUM = ARC_LAST_AUX_REGNUM,
/* Additional ABI constants. */
@@ -105,6 +107,9 @@ enum arc_regnum
/* STATUS32 register: current instruction is a delay slot. */
#define ARC_STATUS32_DE_MASK (1 << 6)
+/* Special value for register offset arrays. */
+#define ARC_OFFSET_NO_REGISTER (-1)
+
#define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args)
extern int arc_debug;
@@ -182,4 +187,9 @@ CORE_ADDR arc_insn_get_branch_target (const struct arc_instruction &insn);
CORE_ADDR arc_insn_get_linear_next_pc (const struct arc_instruction &insn);
+/* Create an arc_arch_features instance from the provided data. */
+
+arc_arch_features arc_arch_features_create (const bfd *abfd,
+ const unsigned long mach);
+
#endif /* ARC_TDEP_H */