diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-01-09 22:14:35 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-01-09 22:14:35 +0000 |
commit | f7a6bb70398a545baf43a6c3ef867b05844d9396 (patch) | |
tree | 3934457c7398484435f7a2785e2b30bc2e0fa38d /gdb/minsyms.c | |
parent | 85bb0718724d504807bbaf72244f43359217cb13 (diff) | |
download | gdb-f7a6bb70398a545baf43a6c3ef867b05844d9396.zip gdb-f7a6bb70398a545baf43a6c3ef867b05844d9396.tar.gz gdb-f7a6bb70398a545baf43a6c3ef867b05844d9396.tar.bz2 |
2007-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* minsyms.c (lookup_minimal_symbol_by_pc_section): Handle
nested symbols.
* gdb.arch/i386-size-overlap.c, gdb.arch/i386-size-overlap.exp: New.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 55f2d4a..e4b0356 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -510,6 +510,22 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section) continue; } + /* If we are past the end of the current symbol, try + the previous symbol if it has a larger overlapping + size. This happens on i686-pc-linux-gnu with glibc; + the nocancel variants of system calls are inside + the cancellable variants, but both have sizes. */ + if (hi > 0 + && MSYMBOL_SIZE (&msymbol[hi]) != 0 + && pc >= (SYMBOL_VALUE_ADDRESS (&msymbol[hi]) + + MSYMBOL_SIZE (&msymbol[hi])) + && pc < (SYMBOL_VALUE_ADDRESS (&msymbol[hi - 1]) + + MSYMBOL_SIZE (&msymbol[hi - 1]))) + { + hi--; + continue; + } + /* Otherwise, this symbol must be as good as we're going to get. */ break; |