diff options
author | Tom de Vries <tdevries@suse.de> | 2021-06-18 12:23:01 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-06-24 17:44:35 +0200 |
commit | 7545a484ad391f59690d747eff32c8beb04c68bd (patch) | |
tree | 5585de23e907fbf9436918db419750371f2d62b9 /gdb/psymtab.c | |
parent | a3d638484949f751aa8c7a8612faf49b6c761812 (diff) | |
download | binutils-7545a484ad391f59690d747eff32c8beb04c68bd.zip binutils-7545a484ad391f59690d747eff32c8beb04c68bd.tar.gz binutils-7545a484ad391f59690d747eff32c8beb04c68bd.tar.bz2 |
[gdb/symtab] Initialize sect_off field of partial_symtab
Initialize sect_off field of partial_tab using the sect_offset of the
top-level DIE of the partial_symbol.
Diffstat (limited to 'gdb/psymtab.c')
-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 e395a10..64f0921 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1335,7 +1335,7 @@ void partial_symtab::add_psymbol (const partial_symbol &psymbol, psymbol_placement where, psymtab_storage *partial_symtabs, - struct objfile *objfile) + struct objfile *objfile, sect_offset sect_off) { bool added; @@ -1355,6 +1355,9 @@ partial_symtab::add_psymbol (const partial_symbol &psymbol, ? static_psymbols : global_psymbols); list.push_back (psym); + + if (to_underlying (sect_off) != 0) + this->sect_off.emplace (psym, sect_off); } /* See psympriv.h. */ |