[COMMITTED] libsframe: revisit sframe_find_fre API
Indu Bhagat
indu.bhagat@oracle.com
Fri May 26 07:43:48 GMT 2023
On 5/26/23 00:30, Jan Beulich wrote:
> On 26.05.2023 09:01, Indu Bhagat via Binutils wrote:
>> @@ -1022,40 +1049,28 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
>> bitmask = 0xff;
>>
>> fres = ctx->sfd_fres + fdep->sfde_func_start_fre_off;
>> + func_start_addr = fdep->sfde_func_start_address;
>> +
>> for (i = 0; i < fdep->sfde_func_num_fres; i++)
>> {
>> - err = sframe_decode_fre (fres, &next_fre, fre_type, &esz);
>> - start_address = next_fre.fre_start_addr;
>> + err = sframe_decode_fre (fres, &cur_fre, fre_type, &size);
>> + if (err)
>> + return sframe_set_errno (&err, SFRAME_ERR_FRE_INVAL);
>>
>> - if (((fdep->sfde_func_start_address
>> - + (int32_t) start_address) & bitmask) <= (pc & bitmask))
>> + start_ip = func_start_addr + cur_fre.fre_start_addr;
>> + end_ip_offset = sframe_fre_get_end_ip_offset (fdep, i, fres + size);
>> + end_ip = func_start_addr + end_ip_offset;
>> +
>> + if ((start_ip & bitmask) > (pc & bitmask))
>> + return sframe_set_errno (&err, SFRAME_ERR_FRE_INVAL);
>> +
>> + if (((start_ip & bitmask) <= (pc & bitmask))
>> + && (end_ip & bitmask) >= (pc & bitmask))
>> {
>> - sframe_frame_row_entry_copy (&cur_fre, &next_fre);
>> -
>> - /* Get the next FRE in sequence. */
>> - if (i < fdep->sfde_func_num_fres - 1)
>> - {
>> - sp += esz;
>
> The buildbot failure just reported was found on the commit prior to this
> one, which removed the declaration of sp. Please try to make sure that
> every patch builds (and works) okay individually.
>
> Jan
[(Re)Sending to binutils@sourceware, I earlier sent my apologies to the
builder@ ;-) ]
Yes, my apologies. Turns out the 4 commits I just did were not
bisectable truly. I split a change into two logical commits, and missed
testing them one by one.
Revision: 812d868850126d8e791795c7e248ffbf580925f6 causes build
failures, but the subsequent commit (Revision:
83c219872b2131546ccec7edc57eb47c64b8911d) fixes the issue.
Will take care in future.
Indu
More information about the Binutils
mailing list