This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] template names with arguments out of DW_AT_name


>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> +/* Set during partial symbol reading, to prevent queueing of full
Pedro> +   symbols.  */
Pedro> +static int reading_partial_symbols;

Is there a particular reason for a new global?  If not, I would prefer a
field in dwarf2_per_objfile.  There is plenty of room there, and I think
it is a bit more understandable, plus friendlier for threading.

Pedro> +  /* If this is a template instantiation, we can not work out the
Pedro> +     template arguments from partial DIEs.  So, unfortunately, we have
Pedro> +     to go through the full DIEs.  At least any work we do building
Pedro> +     types here will be reused if full symbols are loaded later.  */

I wonder whether this invalidates the multi-threading patches.

I suspect it does not, but it is hard to be certain.  Those patches
relied on partial symbol reading using relatively few globals; full
symbol reading uses more, and it isn't totally clear to me whether this
code touches those or not.

This doesn't affect this patch, I'm just wondering aloud.

Pedro> +		      /* Specify decimal so that we do not depend on the radix.  */
Pedro> +		      get_formatted_print_options (&opts, 'd');

I think you probably want to set the 'raw' field here.

I don't think this will properly handle a DW_TAG_template_parameter that
points to some other symbol.  IIUC, this code will just print the
address of the symbol, but it should actually print "&symbol".

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]