summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@arc.com>2002-05-22 18:16:45 +0000
committerJoern Rennecke <joern.rennecke@arc.com>2002-05-22 18:16:45 +0000
commita05094377b34239a9c2e8be9863565191ad61f5a (patch)
tree4cf50ee6ed3e8bb47fa5040bf24d732eff25bbb6
parent4795b1aaf57cab1c4a809404931d89f781782fa5 (diff)
downloadgdb-a05094377b34239a9c2e8be9863565191ad61f5a.tar.gz
Avoid dereferencing null pointer in:
* sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 for disassembly.
-rw-r--r--opcodes/ChangeLog2
-rw-r--r--opcodes/sh-dis.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 80b10e55dce..3f1f930b8fc 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,4 +1,4 @@
-Wed May 22 14:13:40 2002 J"orn Rennecke <joern.rennecke@superh.com>
+Wed May 22 19:13:27 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4
for disassembly.
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 7f403806dd4..24d4b41eaff 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -304,7 +304,8 @@ print_insn_sh (memaddr, info)
/* SH coff object files lack information about the machine type, so
we end up with bfd_mach_sh unless it was set explicitly (which
could have happended if this is a call from gdb or the simulator.) */
- if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
+ if (info->symbols
+ && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
target_arch = arch_sh4;
break;
case bfd_mach_sh2: