forked from Imagelibrary/binutils-gdb
[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.
This commit is contained in:
@@ -198,12 +198,13 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
|
|||||||
pc - baseaddr));
|
pc - baseaddr));
|
||||||
if (pst != NULL)
|
if (pst != NULL)
|
||||||
{
|
{
|
||||||
|
struct partial_symbol *p = nullptr;
|
||||||
|
|
||||||
/* FIXME: addrmaps currently do not handle overlayed sections,
|
/* FIXME: addrmaps currently do not handle overlayed sections,
|
||||||
so fall back to the non-addrmap case if we're debugging
|
so fall back to the non-addrmap case if we're debugging
|
||||||
overlays and the addrmap returned the wrong section. */
|
overlays and the addrmap returned the wrong section. */
|
||||||
if (overlay_debugging && msymbol.minsym != NULL && section != NULL)
|
if (overlay_debugging && msymbol.minsym != NULL && section != NULL)
|
||||||
{
|
{
|
||||||
struct partial_symbol *p;
|
|
||||||
|
|
||||||
/* NOTE: This assumes that every psymbol has a
|
/* NOTE: This assumes that every psymbol has a
|
||||||
corresponding msymbol, which is not necessarily
|
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
|
granularity and FIND_PC_SECT_PSYMTAB_CLOSER may mislead us into
|
||||||
a worse chosen section due to the TEXTLOW/TEXTHIGH ranges
|
a worse chosen section due to the TEXTLOW/TEXTHIGH ranges
|
||||||
overlap. */
|
overlap. */
|
||||||
|
if (lazy_expand_symtab_p && p == nullptr)
|
||||||
|
p = find_pc_sect_psymbol (objfile, pst, pc, section);
|
||||||
|
|
||||||
return pst;
|
return pst;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user