diff options
author | Tom de Vries <tdevries@suse.de> | 2021-06-21 15:34:07 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-06-24 17:48:26 +0200 |
commit | 7cfa3f39ada3a8c2ac875e4fdd10a8be65c968b7 (patch) | |
tree | 65e0b3c4320c3d722c92ee3ee64a69285d2a8ad0 | |
parent | e52b6e27f0c9f151267b0b45ed4a96894a5e23dc (diff) | |
download | binutils-7cfa3f39ada3a8c2ac875e4fdd10a8be65c968b7.zip binutils-7cfa3f39ada3a8c2ac875e4fdd10a8be65c968b7.tar.gz binutils-7cfa3f39ada3a8c2ac875e4fdd10a8be65c968b7.tar.bz2 |
[gdb/symtab] Fixup psymbol_functions::find_pc_sect_psymtab
When calling psymbol_functions::find_pc_sect_psymtab, we do not end up with an
actual symbol that we can declare interesting, so go find it.
-rw-r--r-- | gdb/psymtab.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 568e673..3e0f7e7 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -198,12 +198,13 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile, pc - baseaddr)); if (pst != NULL) { + struct partial_symbol *p = nullptr; + /* FIXME: addrmaps currently do not handle overlayed sections, so fall back to the non-addrmap case if we're debugging overlays and the addrmap returned the wrong section. */ if (overlay_debugging && msymbol.minsym != NULL && section != NULL) { - struct partial_symbol *p; /* NOTE: This assumes that every psymbol has a corresponding msymbol, which is not necessarily @@ -224,6 +225,8 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile, granularity and FIND_PC_SECT_PSYMTAB_CLOSER may mislead us into a worse chosen section due to the TEXTLOW/TEXTHIGH ranges overlap. */ + if (lazy_expand_symtab_p && p == nullptr) + p = find_pc_sect_psymbol (objfile, pst, pc, section); return pst; } |