[PATCH, V3 5/6] libsframe: stop search for SFrame FRE if its start IP is greater than PC
Jan Beulich
jbeulich@suse.com
Fri Jun 6 09:29:09 GMT 2025
On 26.05.2025 07:08, Indu Bhagat wrote:
> From: Jens Remus <jremus@linux.ibm.com>
>
> The SFrame FREs for an SFrame FDE are sorted on their start address.
> Therefore the linear search for a matching SFrame FRE can be stopped,
> if its start address is greater than the searched for PC.
>
> libsframe/
> * sframe.c (sframe_find_fre): Stop search if FRE's start IP is
> greater than PC.
>
> Signed-off-by: Jens Remus <jremus@linux.ibm.com>
>
> ---
> [No changes in V3]
> [New in V2]
> ---
> libsframe/sframe.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/libsframe/sframe.c b/libsframe/sframe.c
> index d16305d629b..d03dd5fc5fe 100644
> --- a/libsframe/sframe.c
> +++ b/libsframe/sframe.c
> @@ -1096,14 +1096,13 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
> {
> sframe_frame_row_entry cur_fre;
> sframe_func_desc_entry *fdep;
> - uint32_t fre_type, fde_type, i;
> + uint32_t fre_type, i;
> int32_t start_ip_offset;
> int32_t func_start_addr;
> int32_t end_ip_offset;
> const char *fres;
> size_t size = 0;
> int err = 0;
> - bool mask_p;
>
> if ((ctx == NULL) || (frep == NULL))
> return sframe_set_errno (&err, SFRAME_ERR_INVAL);
> @@ -1114,8 +1113,6 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
> return sframe_set_errno (&err, SFRAME_ERR_DCTX_INVAL);
>
> fre_type = sframe_get_fre_type (fdep);
> - fde_type = sframe_get_fde_type (fdep);
> - mask_p = (fde_type == SFRAME_FDE_TYPE_PCMASK);
The removal of these two local vars looks unrelated. I won't insist on this
being moved to a separate patch, but the change then wants mentioning in the
description (to at least make clear it's deliberate, not a mistake).
Jan
More information about the Binutils
mailing list