]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
S12Z: Disassembly: Fallback to show the address if the symbol table is empty.
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 22 Oct 2018 14:59:47 +0000 (16:59 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 22 Oct 2018 18:53:15 +0000 (20:53 +0200)
* opcodes/s12z-dis.c (decode_possible_symbol): Add fallback case.
  (rel_15_7): Likewise.

opcodes/ChangeLog
opcodes/s12z-dis.c

index 3d26869e51f6225131c1e899f1907b63d1f2ce8c..82fbc75723e9d5a49931630d99068568e2904bc1 100644 (file)
@@ -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.
index 6ca9f071f36d6b9ade769c5d1fb0084fce9abd7a..ad39e052175f1038cd0ac3b1dc1c5d6f97900c25 100644 (file)
@@ -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);
     }
 }