Files
binutils-gdb/include
Indu Bhagat a50279706b [SFrame-V3] libsframe: testsuite: add new argument to offset access APIs
For FDE type SFRAME_FDE_TYPE_FLEX, the offsets are not only laid out
differently, they also have different encoding:
  - first data item is of unsigned type, it indicates the "Control Word"
  - second data item is of signed  type, it indicates the "Offset Word"
(The usage of "Word" above is colloquial, does not indicate a machine word of
a specific size.)

Adjust the APIs in libsframe to get stack frame offsets by adding a new
argument type.  Also add a new API to read the data items as unsigned
types of the specified size: sframe_get_fre_udata.

At the moment, like the generation routines in GAS, the textual dump
routines in sframe-dump.c are also unaware of the FDE type
SFRAME_FDE_TYPE_FLEX.  In the next commits, these capabilities will be
added.

include/
	* sframe-api.h (MAX_NUM_STACK_OFFSETS): Increase the number of
	stack offsets to 6 to accommodate the FDE type
	SFRAME_FDE_TYPE_FLEX.
	(sframe_get_fre_udata): New declaration.
	(sframe_fre_get_cfa_offset): Add new arg.
	(sframe_fre_get_fp_offset): Likewise.
	(sframe_fre_get_ra_offset): Likewise.
libsframe/
	* libsframe/sframe-dump.c (dump_sframe_func_with_fres): Pass
	SFRAME_FDE_TYPE_DEFAULT for FDE type.
	* sframe.c (sframe_fre_get_cfa_offset): Handle FDE type.
	(sframe_fre_get_fp_offset): Likewise.
	(sframe_fre_get_ra_offset): Likewise.
	* libsframe/libsframe.ver: Add new API sframe_get_fre_udata.
libsframe/testsuite/
	* libsframe.find/findfre-1.c: Pass SFRAME_FDE_TYPE_DEFAULT for
	FDE type.
	* libsframe.find/findfunc-1.c: Likewise.
	* libsframe.find/plt-findfre-1.c: Likewise.
	* libsframe.find/plt-findfre-2.c: Likewise.
2026-01-15 17:02:25 -08:00
..