aboutsummaryrefslogtreecommitdiff
path: root/gdb/arc-tdep.c
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2016-07-06 20:36:49 +0300
committerShahab Vahedi <shahab@synopsys.com>2020-08-25 17:31:29 +0200
commit8d7f06359adf0d3da93acec0f0ded9076f54ebdb (patch)
tree61f12ed6aa534b5bf6cb08effd0d672a77767a05 /gdb/arc-tdep.c
parentfdd8731bd137e55453b501fa5404b5e6f60ddea0 (diff)
downloadgdb-8d7f06359adf0d3da93acec0f0ded9076f54ebdb.zip
gdb-8d7f06359adf0d3da93acec0f0ded9076f54ebdb.tar.gz
gdb-8d7f06359adf0d3da93acec0f0ded9076f54ebdb.tar.bz2
arc: Add GNU/Linux support for ARC
ARC Linux targets differences from baremetal: - No support for hardware single instruction stepping. - Different access rules to registers. - Use of another instruction for breakpoints. v2: Changes after Tom's remarks [1] arc-linux-tdep.c - Use true/false instead of TRUE/FALSE. - arc_linux_sw_breakpoint_from_kind (): Break long lines into two. - arc_linux_sw_breakpoint_from_kind (): Remove starting blank line. - Use explicit number evaluation, e.g: if (a & b) -> if ((a & b) != 0) arc-tdep.c - Use explicit number evaluation, e.g: if (a & b) -> if ((a & b) != 0) gdb/configure.tgt - arc*-*-linux*): Remove "build_gdbserver=yes". v3: Changes after Simon's remarks [2] arc-linux-tdep.c - Use "return trap_size" instead of cryptic "return 2". - Removed unnecessary curly braces. - Removed "void" from "_initialize_arc_linux_tdep (void)". v5: Changes after Simon's remarks [3] - Remove unnecessary empty lines. - Replace "breakpoint uses" with "breakpoints use" in a comment. - "return condition;" i.s.o. "if (condition) return true; else return false;" [1] Tom's remarks https://sourceware.org/pipermail/gdb-patches/2020-April/167887.html [2] Simon's remarks on v2 https://sourceware.org/pipermail/gdb-patches/2020-May/168513.html [3] Simon's remarks on v4 https://sourceware.org/pipermail/gdb-patches/2020-August/170994.html gdb/ChangeLog: 2020-08-25 Anton Kolesov <anton.kolesov@synopsys.com> * configure.tgt: ARC support for GNU/Linux. * Makefile.in (ALL_TARGET_OBJS): Likewise. * arc-linux-tdep.c: New file. * arc-tdep.h (ARC_STATUS32_L_MASK, ARC_STATUS32_DE_MASK): Declare. * arc-tdep.c (arc_write_pc): Use it.
Diffstat (limited to 'gdb/arc-tdep.c')
-rw-r--r--gdb/arc-tdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 8b4e285..6f544bf 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -612,8 +612,7 @@ arc_write_pc (struct regcache *regcache, CORE_ADDR new_pc)
regcache_cooked_read_unsigned (regcache, gdbarch_ps_regnum (gdbarch),
&status32);
- /* Mask for DE bit is 0x40. */
- if (status32 & 0x40)
+ if ((status32 & ARC_STATUS32_DE_MASK) != 0)
{
if (arc_debug)
{