Re: [RFA] dwarf debug format: Support DW_AT_variable_parameter attribute

Tom Tromey
2010-05-19T18:57:29Z

>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre> I looked a little more into the sources
Pierre> and now understand that my patch is indeed
Pierre> wrong :(

[...]

Pierre> See note line 8459 from dwarf2read.c source.
Pierre> /* NOTE drow/2002-01-30: It might be worthwhile to have a static
Pierre> expression evaluator, and use LOC_COMPUTED only when necessary
Pierre> (i.e. when the value of a register or memory location is
Pierre> referenced, or a thread-local block, etc.). Then again, it might
Pierre> not be worthwhile. I'm assuming that it isn't unless performance
Pierre> or memory numbers show me otherwise. */

Pierre> I fear that my patch will have to wait until
Pierre> this static expression evaluator is implemented...

I'm not totally convinced that we would want such an evaluator.

Could you change the type of a parameter marked with
DW_AT_variable_parameter to be a reference type instead? It seems to me
that this would give the same result, or nearly so.

Tom