]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libsframe: use sf_fde_tbl data structure internally for the decoder users/ibhagat/try-sframe-v3-prep1
authorIndu Bhagat <indu.bhagat@oracle.com>
Thu, 16 Oct 2025 22:31:05 +0000 (15:31 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Fri, 17 Oct 2025 06:46:58 +0000 (23:46 -0700)
commit5ed776f25050eb67f07d13088297f98bead7c67b
treeeee4a747bf8972915059c0b04b87010b1d1e227b
parentf7e73777151e48239a637fefd7af36f1a124b697
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 of SFrame FDE, as well as a newer on-disk
representation 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 (and still libsframe
internal) definition for 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