On 07-04-2020 15:09, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> (gdb) p aaa^M > Tom> No symbol "aaa" in current context.^M > > Tom> Fix this by making sure that partial_die_info::has_const_value is > Tom> inherited in partial_die_info::fixup. > > It's clearly necessary to do something like this (unfortunate IMO, but > necessary). However, has_specification is set for many things: > > case DW_AT_abstract_origin: > case DW_AT_specification: > case DW_AT_extension: > has_specification = 1; > > ... but I think perhaps only DW_TAG_variable actually needs this? > > Tom> + if (!has_const_value && has_specification) > > ... so maybe it would be more efficient to check for DW_TAG_variable > here. What do you think? > I think that if we check for tag, we need to check for all tags that can contain DW_AT_const_value. Updated patch accordingly. > My main concern is not to make psymbol reading any slower than it > already is. Still faster than -readnow though, I hope :) Cheers, - Tom