From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7850) id 96B533871D25; Fri, 9 Dec 2022 18:27:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96B533871D25 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Indu Bhagat To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_info X-Act-Checkin: binutils-gdb X-Git-Author: Indu Bhagat X-Git-Refname: refs/heads/master X-Git-Oldrev: 989aabcb564dccc7804f174fc582b0639357a9bb X-Git-Newrev: b659fb35854e49ac16a5538d24bf0e3f0d6e6121 Message-Id: <20221209182758.96B533871D25@sourceware.org> Date: Fri, 9 Dec 2022 18:27:58 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2022 18:27:58 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db659fb35854e= 49ac16a5538d24bf0e3f0d6e6121 commit b659fb35854e49ac16a5538d24bf0e3f0d6e6121 Author: Indu Bhagat Date: Fri Dec 9 10:25:31 2022 -0800 libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_in= fo =20 The new name better reflects the purpose of the function. =20 ChangeLog: =20 * bfd/elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Use new name. * libsframe/sframe.c (sframe_fde_create_func_info): Rename sframe_fde_func_info to this. * libsframe/testsuite/libsframe.encode/encode-1.c: Use new name. =20 include/ChangeLog: =20 * sframe-api.h (sframe_fde_create_func_info): Rename sframe_fde_func_info to this. Diff: --- bfd/elfxx-x86.c | 6 +++--- include/sframe-api.h | 4 ++-- libsframe/sframe.c | 6 +++--- libsframe/testsuite/libsframe.encode/encode-1.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index bbf868826e5..88c34d397a8 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -1857,8 +1857,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd, =20 /* FRE type is dependent on the size of the function. */ fre_type =3D sframe_calc_fre_type (dpltsec->size); - func_info =3D sframe_fde_func_info (fre_type, - SFRAME_FDE_TYPE_PCINC); + func_info =3D sframe_fde_create_func_info (fre_type, SFRAME_FDE_TYPE_PCI= NC); =20 /* Add SFrame FDE and the associated FREs for plt0 if plt0 has been generated. */ @@ -1888,7 +1887,8 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd, pattern of the instructions in these entries. Using this SFrame FDE type helps in keeping the unwind information for pltn entries compact. */ - func_info =3D sframe_fde_func_info (fre_type, SFRAME_FDE_TYPE_PCMASK= ); + func_info =3D sframe_fde_create_func_info (fre_type, + SFRAME_FDE_TYPE_PCMASK); /* Add the SFrame FDE for all PCs starting at the first pltn entry (= hence, function start address =3D plt0_entry_size. As usual, this will be updated later at _bfd_elf_merge_section_sframe, by when the diff --git a/include/sframe-api.h b/include/sframe-api.h index c658474253f..0a86389857c 100644 --- a/include/sframe-api.h +++ b/include/sframe-api.h @@ -83,10 +83,10 @@ _SFRAME_ERRORS extern const char * sframe_errmsg (int error); =20 -/* Get FDE function info given a FRE_TYPE. */ +/* Create an FDE function info bye given an FRE_TYPE and an FDE_TYPE. */ =20 extern unsigned char -sframe_fde_func_info (unsigned int fre_type, unsigned int fde_type); +sframe_fde_create_func_info (unsigned int fre_type, unsigned int fde_type); =20 /* Gather the FRE type given the function size. */ =20 diff --git a/libsframe/sframe.c b/libsframe/sframe.c index 64fa9078d62..d4eaaee2297 100644 --- a/libsframe/sframe.c +++ b/libsframe/sframe.c @@ -548,12 +548,12 @@ sframe_decoder_free (sframe_decoder_ctx **decoder) } } =20 -/* Create a FDE function info byte given an FRE_TYPE and an FDE_TYPE. */ +/* Create an FDE function info byte given an FRE_TYPE and an FDE_TYPE. */ /* FIXME API for linker. Revisit if its better placed somewhere else? */ =20 unsigned char -sframe_fde_func_info (unsigned int fre_type, - unsigned int fde_type) +sframe_fde_create_func_info (unsigned int fre_type, + unsigned int fde_type) { unsigned char func_info; sframe_assert (fre_type =3D=3D SFRAME_FRE_TYPE_ADDR1 diff --git a/libsframe/testsuite/libsframe.encode/encode-1.c b/libsframe/te= stsuite/libsframe.encode/encode-1.c index 4075591ffa1..01481106a62 100644 --- a/libsframe/testsuite/libsframe.encode/encode-1.c +++ b/libsframe/testsuite/libsframe.encode/encode-1.c @@ -39,8 +39,8 @@ add_fde1 (sframe_encoder_ctx *encode, int idx) {0x1a, 0x5, {0x8, 0xf0, 0}} }; =20 - unsigned char finfo =3D sframe_fde_func_info (SFRAME_FRE_TYPE_ADDR1, - SFRAME_FDE_TYPE_PCINC); + unsigned char finfo =3D sframe_fde_create_func_info (SFRAME_FRE_TYPE_ADD= R1, + SFRAME_FDE_TYPE_PCINC); err =3D sframe_encoder_add_funcdesc (encode, 0xfffff03e, 0x1b, finfo, 4); if (err =3D=3D -1) return err; @@ -64,8 +64,8 @@ add_fde2 (sframe_encoder_ctx *encode, int idx) {0xf, 0x5, {0x8, 0xf0, 0}} }; =20 - unsigned char finfo =3D sframe_fde_func_info (SFRAME_FRE_TYPE_ADDR1, - SFRAME_FDE_TYPE_PCINC); + unsigned char finfo =3D sframe_fde_create_func_info (SFRAME_FRE_TYPE_ADD= R1, + SFRAME_FDE_TYPE_PCINC); err =3D sframe_encoder_add_funcdesc (encode, 0xfffff059, 0x10, finfo, 4); if (err =3D=3D -1) return err;