forked from Imagelibrary/binutils-gdb
* buildsym.c (end_symtab): Remove sort_pending and sort_linevec
arguments. Sorting is now dependent on OBJF_REORDERED. All
callers/references changed.
* dbxread.c (read_ofile_symtab): Correctly determine value for
last_source_start_addr for reordered executables.
(process_one_symbol): Handle N_FUN with no name as an end of
function marker.
* partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE
is the high text address for a psymtab.
(case N_SO): Likewise.
(case N_FUN): Handle N_FUN with no name as an end of function
marker.
* minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols
at the same address rather than a random subset of them.
* coffread.c (coff_symfile_init): Set OBJF_REORDERED.
* elfread.c (elf_symfile_init): Similarly.
* somread.c (som_symfile_init): Similarly.
* xcoffread.c (xcoff_symfile_init): Similarly.
Support for debugging reordered executables. Remaining mentor vm
changes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* GDB routines for manipulating the minimal symbol tables.
|
||||
Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
Copyright 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support, using pieces from other GDB modules.
|
||||
|
||||
This file is part of GDB.
|
||||
@@ -253,7 +253,6 @@ lookup_minimal_symbol_text (name, sfile, objf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Search through the minimal symbol table for each objfile and find the
|
||||
symbol whose address is the largest address that is still less than or
|
||||
equal to PC. Returns a pointer to the minimal symbol if such a symbol
|
||||
@@ -325,6 +324,15 @@ lookup_minimal_symbol_by_pc (pc)
|
||||
lo = new;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have multiple symbols at the same address, we want
|
||||
hi to point to the last one. That way we can find the
|
||||
right symbol if it has an index greater than hi. */
|
||||
while (hi < objfile -> minimal_symbol_count - 1
|
||||
&& (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
|
||||
== SYMBOL_VALUE_ADDRESS (&msymbol[hi+1])))
|
||||
hi++;
|
||||
|
||||
/* The minimal symbol indexed by hi now is the best one in this
|
||||
objfile's minimal symbol table. See if it is the best one
|
||||
overall. */
|
||||
|
||||
Reference in New Issue
Block a user