aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/arc-linux-tdep.c1
-rw-r--r--gdb/arc-tdep.c1
-rw-r--r--gdb/disasm-selftests.c10
4 files changed, 15 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 214d048..a887a83 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2020-11-17 Andrew Burgess <andrew.burgess@embecosm.com>
+ * arc-linux-tdep.c (arc_linux_sw_breakpoint_from_kind): Add an
+ assert.
+ * arc-tdep.c (arc_breakpoint_kind_from_pc): Likewise.
+ * disasm-selftests.c (print_one_insn_test): Fall throough from ARC
+ case to the default.
+
+2020-11-17 Andrew Burgess <andrew.burgess@embecosm.com>
+
* printcmd.c: Include 'safe-ctype.c'.
(skip_over_slash_fmt): New function.
(print_command_completer): Call skip_over_slash_fmt.
diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c
index 6e74bae..ef459bf 100644
--- a/gdb/arc-linux-tdep.c
+++ b/gdb/arc-linux-tdep.c
@@ -149,6 +149,7 @@ static const gdb_byte *
arc_linux_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
int kind, int *size)
{
+ gdb_assert (kind == trap_size);
*size = kind;
return ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
? arc_linux_trap_s_be
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index bcc7359..d18d3bc 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -1634,6 +1634,7 @@ arc_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
static const gdb_byte *
arc_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
+ gdb_assert (kind == 2 || kind == 4);
*size = kind;
if (kind == sizeof (arc_brk_le))
diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c
index a24db7f..f8f9993 100644
--- a/gdb/disasm-selftests.c
+++ b/gdb/disasm-selftests.c
@@ -69,11 +69,6 @@ print_one_insn_test (struct gdbarch *gdbarch)
insn = xstormy16_insn;
len = sizeof (xstormy16_insn);
break;
- case bfd_arch_arc:
- /* PR 21003 */
- if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601)
- return;
- /* fall through */
case bfd_arch_nios2:
case bfd_arch_score:
case bfd_arch_riscv:
@@ -86,6 +81,11 @@ print_one_insn_test (struct gdbarch *gdbarch)
len = bplen;
}
break;
+ case bfd_arch_arc:
+ /* PR 21003 */
+ if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601)
+ return;
+ /* fall through */
default:
{
/* Test disassemble breakpoint instruction. */