diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2023-06-27 11:53:40 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2023-06-27 12:01:56 -0700 |
commit | 852bb8c10de8abef79f0771dca879ddc8e4298b3 (patch) | |
tree | 95c7ab78b2dd5daa2b7f54e4bcf4321f14b549a5 /include/sframe-api.h | |
parent | b91671f3f99a75be6573287e543b6eacb4acb895 (diff) | |
download | binutils-852bb8c10de8abef79f0771dca879ddc8e4298b3.zip binutils-852bb8c10de8abef79f0771dca879ddc8e4298b3.tar.gz binutils-852bb8c10de8abef79f0771dca879ddc8e4298b3.tar.bz2 |
libsframe: remove sframe_get_funcdesc_with_addr API
This is an incompatible ABI change in libsframe.
The interface provided by this function is not a healthy abstraction to
expose: the return type sframe_func_desc_entry, which is defined in
include/sframe.h (the SFrame binary format definition). This ties up
the library in a undesirable way. Most importantly, this function
should technically not be directly necessary for a stack tracer. A
stack tracer will likely only need to do a sframe_find_fre ().
Rename the API to continue to use the functionality internally in the
library. bfd/linker does not use this function.
Change the return type of the previous definition and make a note about
its planned deprecation.
include/
* sframe-api.h: Change return type of sframe_get_funcdesc_with_addr.
Add comment for intention to deprecate.
libsframe/
*sframe.c (sframe_get_funcdesc_with_addr): Change return type
and set error code. This API is deprecated.
(sframe_get_funcdesc_with_addr_internal): New definition for
internal use.
(sframe_find_fre): Use sframe_get_funcdesc_with_addr_internal
instead.
Diffstat (limited to 'include/sframe-api.h')
-rw-r--r-- | include/sframe-api.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/sframe-api.h b/include/sframe-api.h index df1f5cc..a00303a 100644 --- a/include/sframe-api.h +++ b/include/sframe-api.h @@ -133,10 +133,13 @@ sframe_decoder_get_fixed_fp_offset (sframe_decoder_ctx *dctx); extern int8_t sframe_decoder_get_fixed_ra_offset (sframe_decoder_ctx *dctx); -/* Find the function descriptor entry which contains the specified address. */ -extern sframe_func_desc_entry * -sframe_get_funcdesc_with_addr (sframe_decoder_ctx *dctx, - int32_t addr, int *errp); +/* Find the function descriptor entry which contains the specified address. + + Note: This function is deprecated and will be removed from future release + X+2 of the library. */ +extern void * +sframe_get_funcdesc_with_addr (sframe_decoder_ctx *dctx, int32_t addr, + int *errp); /* Find the SFrame Frame Row Entry which contains the PC. Returns SFRAME_ERR if failure. */ |