[PATCH][gdb/symtab] Add symbol with inherited DW_AT_const_value to psymtabs

Tom Tromey tom@tromey.com
Tue Apr 7 13:09:23 GMT 2020


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> 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?

My main concern is not to make psymbol reading any slower than it
already is.

Tom


More information about the Gdb-patches mailing list