diff options
author | Nick Clifton <nickc@redhat.com> | 2021-11-25 13:11:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-11-25 13:11:25 +0000 |
commit | 7060c28edd16a871fe1f8edaa8e49083a39b7ee5 (patch) | |
tree | 89399f732c4a47604f0772a45e206954d9f6e2de /opcodes/aarch64-opc.c | |
parent | a41ad3474ceacba39e11c7478154c0e553784a01 (diff) | |
download | gdb-7060c28edd16a871fe1f8edaa8e49083a39b7ee5.zip gdb-7060c28edd16a871fe1f8edaa8e49083a39b7ee5.tar.gz gdb-7060c28edd16a871fe1f8edaa8e49083a39b7ee5.tar.bz2 |
Fix building the AArch64 assembler and disassembler when assertions are disabled.
PR 28614
* aarch64-asm.c: Replace assert(0) with real code.
* aarch64-dis.c: Likewise.
* aarch64-opc.c: Likewise.
Diffstat (limited to 'opcodes/aarch64-opc.c')
-rw-r--r-- | opcodes/aarch64-opc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index a37b3ff..ef0ba8a 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -3595,7 +3595,9 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, snprintf (buf, size, "#0x%-20" PRIx64 "\t// #%" PRIi64, opnd->imm.value, opnd->imm.value); break; - default: assert (0); + default: + snprintf (buf, size, "<invalid>"); + break; } break; @@ -3662,7 +3664,9 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, snprintf (buf, size, "#%.18e", c.d); } break; - default: assert (0); + default: + snprintf (buf, size, "<invalid>"); + break; } break; @@ -3934,7 +3938,8 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, break; default: - assert (0); + snprintf (buf, size, "<invalid>"); + break; } } |