]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libsframe: use sf_fde_tbl data structure internally for the decoder
authorIndu Bhagat <indu.bhagat@oracle.com>
Sat, 1 Nov 2025 08:46:42 +0000 (01:46 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Sat, 1 Nov 2025 08:47:29 +0000 (01:47 -0700)
commit3ae28d077631edb627e8863517b48375a97754ea
tree5311e059bb67cc879ae1effef891dc6344414b14
parentf264ead9fb99b9c7627611900e7a18ba13da89f0
libsframe: use sf_fde_tbl data structure internally for the decoder

Instead of the current sframe_func_desc_entry (on-disk format
representation) data structure.

The decoder context in libsframe, so far, has been internally directly
tied to the sframe_func_desc_entry (on-disk format representation) data
structure.  While this allows libsframe to avoid some operations, this
is not desirable anymore as the format evolves: we will need to support
reading in of older version(s) of SFrame FDE, as well as a newer on-disk
representations for SFrame FDE.

Use sf_fde_tbl internally in the decoder context.  Note that libsframe
already does _not_ use sframe_func_desc_entry in any external-facing,
user-visible APIs.

Note that this commit is simply preparatory in nature.  At the moment,
the 'sf_fde_tbl' internally uses the sframe_func_desc_entry (on-disk
format representation).  When need arises (as SFrame FDE evolves), we
may change sf_fde_tbl to use an alternative (but still libsframe
internal) definition of SFrame FDE.

lisbframe/
        * sframe-impl.h (sf_fde_tbl, sf_fre_tbl): Move definition before use.
Use sf_fde_tbl instead of sframe_func_desc_entry in struct
        sframe_decoder_ctx.
        * sframe.c (sframe_fde_tbl_alloc): New internal definition.
        (sframe_fde_tbl_init): Likewise.
        (sframe_decoder_get_funcdesc_at_index): Adjust for sf_fde_tbl
usage.
        (sframe_decoder_get_secrel_func_start_addr): Likewise.
        (sframe_fre_check_range_p): Likewise.
        (sframe_decode): Likewise.
        (sframe_get_funcdesc_with_addr_internal): Likewise.
libsframe/sframe-impl.h
libsframe/sframe.c