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: RFC: DW_OP_call_frame_cfa, again


>>>>> "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


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