2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / minsyms.c
index 393a0ea9143c7fca97db51ff9a9e9d8270877eec..ee730a449a9ceda261afd723741cefff6de1c975 100644 (file)
@@ -1,6 +1,6 @@
 /* GDB routines for manipulating the minimal symbol tables.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -216,7 +216,7 @@ lookup_minimal_symbol (const char *name, const char *sfile,
        objfile = objfile->next)
     {
       if (objf == NULL || objf == objfile
-         || objf->separate_debug_objfile == objfile)
+         || objf == objfile->separate_debug_objfile_backlink)
        {
          /* Do two passes: the first over the ordinary hash table,
             and the second over the demangled hash table.  */
@@ -324,7 +324,7 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf)
        objfile = objfile->next)
     {
       if (objf == NULL || objf == objfile
-         || objf->separate_debug_objfile == objfile)
+         || objf == objfile->separate_debug_objfile_backlink)
        {
          for (msymbol = objfile->msymbol_hash[hash];
               msymbol != NULL && found_symbol == NULL;
@@ -377,7 +377,7 @@ lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name,
        objfile = objfile->next)
     {
       if (objf == NULL || objf == objfile
-         || objf->separate_debug_objfile == objfile)
+         || objf == objfile->separate_debug_objfile_backlink)
        {
          for (msymbol = objfile->msymbol_hash[hash];
               msymbol != NULL;
@@ -416,7 +416,7 @@ lookup_minimal_symbol_solib_trampoline (const char *name,
        objfile = objfile->next)
     {
       if (objf == NULL || objf == objfile
-         || objf->separate_debug_objfile == objfile)
+         || objf == objfile->separate_debug_objfile_backlink)
        {
          for (msymbol = objfile->msymbol_hash[hash];
               msymbol != NULL && found_symbol == NULL;
@@ -473,11 +473,10 @@ lookup_minimal_symbol_by_pc_section_1 (CORE_ADDR pc,
      no telling which one will have the minimal symbols.  */
 
   gdb_assert (section != NULL);
-  objfile = section->objfile;
-  if (objfile->separate_debug_objfile)
-    objfile = objfile->separate_debug_objfile;
 
-  for (; objfile != NULL; objfile = objfile->separate_debug_objfile_backlink)
+  for (objfile = section->objfile;
+       objfile != NULL;
+       objfile = objfile_separate_debug_iterate (section->objfile, objfile))
     {
       /* If this objfile has a minimal symbol table, go search it using
          a binary search.  Note that a minimal symbol table always consists
This page took 0.02462 seconds and 4 git commands to generate.