]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libsframe: testsuite: add tests for sframe_get_funcdesc_with_addr API
authorIndu Bhagat <indu.bhagat@oracle.com>
Thu, 18 May 2023 06:14:52 +0000 (23:14 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Thu, 18 May 2023 06:14:52 +0000 (23:14 -0700)
commit6a99f006ecadaf604258b583dec642de2d6f88ec
tree22a1587047c725d0aaf94dd501ea13c8a681f979
parentefd3b63b68b56c15ba4558d937214251a4ef16df
libsframe: testsuite: add tests for sframe_get_funcdesc_with_addr API

sframe_get_funcdesc_with_addr API is currently used internally by the
sframe_find_fre ().

In this test, we create three dummy SFrame FDEs with 4 FREs each.  Then,
we use few negative tests to lookup FREs with PCs not in the range of
PCs covered by the FDEs, ensuring graceful return from
sframe_get_funcdesc_with_addr in all cases.  Some positive tests are
also added that exercise further scenarios as well.

libsframe/
* Makefile.in: Regenerated.
* testsuite/libsframe.find/find.exp: Include new test.
* testsuite/libsframe.find/findfunc-1.c: New Test.
* testsuite/libsframe.find/local.mk: Include new test.
libsframe/Makefile.in
libsframe/testsuite/libsframe.find/find.exp
libsframe/testsuite/libsframe.find/findfunc-1.c [new file with mode: 0644]
libsframe/testsuite/libsframe.find/local.mk