This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: DW_OP_call_frame_cfa, again
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 01 Sep 2009 17:47:36 -0600
- Subject: Re: RFC: DW_OP_call_frame_cfa, again
- References: <m37hxauldt.fsf@fleche.redhat.com> <m3skf6tu5i.fsf@fleche.redhat.com> <200909020023.57398.pedro@codesourcery.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>> +/* CFA accesses require a frame. */
>> +static CORE_ADDR
>> +needs_frame_frame_cfa (void *baton)
>> +{
>> + struct needs_frame_baton *nf_baton = baton;
>> + nf_baton->needs_frame = 1;
>> + return 1;
>> +}
>> +
Pedro> Return type is CORE_ADDR, but it returns 1?
Yes, just like needs_frame_read_reg and needs_frame_tls_address in the
same section. The result is arbitrary, in this code the expression is
being evaluated for its side effect of computing needs_frame.
I am not really certain that this code always works. It seems to me
that it won't handle branches properly. But, that is a not a bug
introduced by my change.
Pedro> Stale comment.
Thanks, I'll fix it.
Tom