]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commit
libsframe: refactor out sframe_fre_grow_tbl
authorIndu Bhagat <indu.bhagat@oracle.com>
Wed, 24 Dec 2025 08:59:07 +0000 (00:59 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Wed, 24 Dec 2025 08:59:07 +0000 (00:59 -0800)
commit613184627df6cf0a6ef4739c7e978a8e1cdb10a2
treef15e51ded050f7fc6758bbc3533ab34c62ff10af
parent1041022101f91c7066c4407c7297aabae88b3c14
libsframe: refactor out sframe_fre_grow_tbl

Usage of a global int number_of_entries is likely unnecessary.  The same
global is used for growing the FDE tbl too, when adding FDEs.  At the
moment, however, carve out a new function to grow the FRE table, and
use a macro instead of 'number_of_entries'.

This refactoring helps provide basis for a later patch where we add
SFrame FREs in bulk instead of one at a time to the SFrame encoder
object.

Reviewed-by: Jens Remus <jremus@linux.ibm.com>
libsframe/
* sframe.c (SFRAME_FRE_ALLOC_LEN): New definition.
(sframe_grow_fre_tbl): New definition.
(sframe_encoder_add_fre): Use the new function.
libsframe/sframe.c