aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2007-04-20 00:00:21 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2007-04-20 00:00:21 +0000
commit86ad2a1353faca2a7f36cef31059e52d6321286b (patch)
treebd7e298bea569a80b868c1a5d2241a0773b6d928 /opcodes
parent12741b1efd88f3c9a72dd27507935b5149e2f5d2 (diff)
downloadgdb-86ad2a1353faca2a7f36cef31059e52d6321286b.zip
gdb-86ad2a1353faca2a7f36cef31059e52d6321286b.tar.gz
gdb-86ad2a1353faca2a7f36cef31059e52d6321286b.tar.bz2
* arm-dis.c (print_insn): Only look for a mapping symbol in the section
being disassembled.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/arm-dis.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1256c4c..b2ad6fb 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-dis.c (print_insn): Only look for a mapping symbol in the section
+ being disassembled.
+
2007-04-19 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index b570ac0..a782d22 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -1,6 +1,6 @@
/* Instruction printing code for the ARM
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ 2007, Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modification by James G. Smith (jsmith@cygnus.co.uk)
@@ -3982,7 +3982,9 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
addr = bfd_asymbol_value (info->symtab[n]);
if (addr > pc)
break;
- if (get_sym_code_type (info, n, &type))
+ if ((info->section == NULL
+ || info->section == info->symtab[n]->section)
+ && get_sym_code_type (info, n, &type))
{
last_sym = n;
found = TRUE;