Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p

Yao Qi
2012-05-16T01:37:14Z

On 05/15/2012 11:01 PM, Joel Brobecker wrote:
>> > No, the extra hidden parameter's type is the reference of the function's
>> > return type. My point is if we only examine debug info, we don't know
>> > whether hidden parameter is passed, because the debug info is the same
>> > regardless of hidden parameter is passed or not.
> I may be too naive, or maybe I am not understanding what you are saying,
> but I find it horrifying that the compiler would generate a parameter
> DIE for a function if that parameter is not actually passed when calling
> that function. Did I misunderstand?

The compiler doesn't generate the DIE for the hidden parameter (it is
not 'this', it is used to store the address of return value). The
situation horrifying you doesn't exist.

My original words are "My point is if we only examine debug info, we
don't know whether hidden parameter is passed, because the debug info is
the same". The "same" means compiler doesn't generate DIE for the
hidden parameter, so it is the same on the targets having hidden
parameter passed and the targets not having hidden parameter passed.

--
Yao (é½å°§)