aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2018-10-22 16:59:47 +0200
committerJohn Darrington <john@darrington.wattle.id.au>2018-10-22 20:53:15 +0200
commit192c2bfbd7a6d4b2069f6b94b020d274a483c198 (patch)
treedee2adcfe066ac7fa2da4dae9ce84dec332fee00 /opcodes
parent1f38083f425e03faf55595414daf291306738222 (diff)
downloadgdb-192c2bfbd7a6d4b2069f6b94b020d274a483c198.zip
gdb-192c2bfbd7a6d4b2069f6b94b020d274a483c198.tar.gz
gdb-192c2bfbd7a6d4b2069f6b94b020d274a483c198.tar.bz2
S12Z: Disassembly: Fallback to show the address if the symbol table is empty.
* opcodes/s12z-dis.c (decode_possible_symbol): Add fallback case. (rel_15_7): Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/s12z-dis.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 3d26869..82fbc75 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-22 John Darrington <john@darrington.wattle.id.au>
+
+ * s12z-dis.c (decode_possible_symbol): Add fallback case.
+ (rel_15_7): Likewise.
+
2018-10-19 Tamar Christina <tamar.christina@arm.com>
* arm-dis.c (UNKNOWN_INSTRUCTION_32BIT): Format specifier for arm mode.
diff --git a/opcodes/s12z-dis.c b/opcodes/s12z-dis.c
index 6ca9f07..ad39e05 100644
--- a/opcodes/s12z-dis.c
+++ b/opcodes/s12z-dis.c
@@ -378,6 +378,8 @@ decode_possible_symbol (bfd_vma addr, struct disassemble_info *info)
}
if (j < info->symtab_size)
(*info->fprintf_func) (info->stream, "%s", bfd_asymbol_name (sym));
+ else
+ (*info->fprintf_func) (info->stream, "%" BFD_VMA_FMT "d", addr);
}
}
@@ -922,6 +924,8 @@ rel_15_7 (bfd_vma memaddr, struct disassemble_info* info, int offset)
}
if (i < info->symtab_size)
(*info->fprintf_func) (info->stream, "%s", bfd_asymbol_name (sym));
+ else
+ (*info->fprintf_func) (info->stream, "*%+d", addr);
}
}