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

Pierre Muller
2010-05-17T21:46:16Z

Whoops,
you are right:

this was Tom's question:
>I wonder whether it is possible for such a parameter to be marked as
>LOC_COMPUTED or LOC_OPTIMIZED_OUT by var_decode_location. If so then
>changing the class to LOC_REF_ARG seems incorrect.

I looked a little more into the sources
and now understand that my patch is indeed
wrong :(
I hoped that simple case like variables in registers
or at a fixed offset relative to stack would simply
be treated as in stabs and assign a LOC_REGISTER
or LOC_ARG SYMBOL_CLASS,
but there is no such conversion ...
See note line 8459 from dwarf2read.c source.
/* NOTE drow/2002-01-30: It might be worthwhile to have a static
expression evaluator, and use LOC_COMPUTED only when necessary
(i.e. when the value of a register or memory location is
referenced, or a thread-local block, etc.). Then again, it might
not be worthwhile. I'm assuming that it isn't unless performance
or memory numbers show me otherwise. */

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

Let's drop this patch for now.

Thanks for the clever question, Tom!

Pierre

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Monday, May 17, 2010 7:47 PM
> À : Pierre Muller
> Cc : 'Tom Tromey'; gdb-patches@sourceware.org
> Objet : Re: [RFA] dwarf debug format: Support DW_AT_variable_parameter
> attribute
>
> > So, may I commit this patch?
>
> As far as I can tell, there was a question from Tom that is still
> unanswered...
>
> --
> Joel