aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-02-11 06:11:38 +0000
committerEli Zaretskii <eliz@gnu.org>2001-02-11 06:11:38 +0000
commit65d5a54a0c8b85fece36b96c13dd2f89b20333fd (patch)
tree3eaec243aff63a5649f99a2a8018d4c12518e88a /gdb/minsyms.c
parent56caf160f3ff23a710fcfa8476cb263fdb6c94c0 (diff)
downloadgdb-65d5a54a0c8b85fece36b96c13dd2f89b20333fd.zip
gdb-65d5a54a0c8b85fece36b96c13dd2f89b20333fd.tar.gz
gdb-65d5a54a0c8b85fece36b96c13dd2f89b20333fd.tar.bz2
* NEWS: Document that "info symbol" works with COFF debug info and
its variants. * minsyms.c (lookup_minimal_symbol_by_pc_section): Don't skip symbols whose SYMBOL_BFD_SECTION is NULL.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 9070b6f..62cd00f 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -482,6 +482,10 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section)
/* This is the new code that distinguishes it from the old function */
if (section)
while (hi >= 0
+ /* Some types of debug info, such as COFF,
+ don't fill the bfd_section member, so don't
+ throw away symbols on those platforms. */
+ && SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
&& SYMBOL_BFD_SECTION (&msymbol[hi]) != section)
--hi;