* NEWS: Document that "info symbol" works with COFF debug info and
authorEli Zaretskii <eliz@gnu.org>
Sun, 11 Feb 2001 06:11:38 +0000 (06:11 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 11 Feb 2001 06:11:38 +0000 (06:11 +0000)
its variants.

* minsyms.c (lookup_minimal_symbol_by_pc_section): Don't skip
symbols whose SYMBOL_BFD_SECTION is NULL.

gdb/ChangeLog
gdb/NEWS
gdb/minsyms.c

index ae38ff09ae7adb7526e1675432b1f97ec4cb6ee1..09b69a62fe9506f21008e93c98a319a40bd83406 100644 (file)
@@ -1,3 +1,11 @@
+2001-02-11  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * 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.
+
 2000-02-10  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
 
        Get rid of AIX specific PC_LOAD_SEGMENT, replace with PC_SOLIB.
index e4bd55a35d014e59ae058e5ec5f8b90ab6f2c804..dc6ad4c0cd80bb04f9e5b61f488fafa7a892147b 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,8 @@
 
 *** Changes since GDB 5.0:
 
+* "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
+
 * New native configurations
 
 Alpha FreeBSD                                  alpha*-*-freebsd*
index 9070b6fee8ffc0f64cf37f296454ae9e902fc0dc..62cd00fce4f190a8da68d82c0e1b84b4ff988b29 100644 (file)
@@ -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;