From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7850) id 07EA43858C33; Tue, 27 Jun 2023 19:42:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07EA43858C33 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: use uint8_t instead of unsigned char for abi_arch X-Act-Checkin: binutils-gdb X-Git-Author: Indu Bhagat X-Git-Refname: refs/heads/master X-Git-Oldrev: 49e4485cba2fa322a649b39c8a05dae8b421331d X-Git-Newrev: de4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e Message-Id: <20230627194242.07EA43858C33@sourceware.org> Date: Tue, 27 Jun 2023 19:42:42 +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: Tue, 27 Jun 2023 19:42:42 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dde4879feca3a= f5d8a7c6a46a8deb1adc3c2c8c0e commit de4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e Author: Indu Bhagat Date: Tue Jun 27 11:55:59 2023 -0700 libsframe: use uint8_t instead of unsigned char for abi_arch =20 Use uint8_t consistently for identifying ABI/arch in SFrame format. =20 bfd/ * elf-sframe.c (_bfd_elf_merge_section_sframe): libsframe/ * sframe-dump.c (is_sframe_abi_arch_aarch64): Use uint8_t for local variable. * sframe.c (sframe_decoder_get_abi_arch): Update return type to uint8_t. (sframe_encoder_get_abi_arch): Likewise. include/ * sframe-api.h (sframe_decoder_get_abi_arch): Likewise. (sframe_encoder_get_abi_arch): Likewise. Diff: --- bfd/elf-sframe.c | 2 +- include/sframe-api.h | 4 ++-- libsframe/sframe-dump.c | 6 +++--- libsframe/sframe.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c index 57d67989bf9..069f7564fb4 100644 --- a/bfd/elf-sframe.c +++ b/bfd/elf-sframe.c @@ -325,7 +325,7 @@ _bfd_elf_merge_section_sframe (bfd *abfd, struct sframe_enc_info *sfe_info; sframe_decoder_ctx *sfd_ctx; sframe_encoder_ctx *sfe_ctx; - unsigned char sfd_ctx_abi_arch; + uint8_t sfd_ctx_abi_arch; int8_t sfd_ctx_fixed_fp_offset; int8_t sfd_ctx_fixed_ra_offset; int encerr =3D 0; diff --git a/include/sframe-api.h b/include/sframe-api.h index 70829ec87cb..e62a7a38285 100644 --- a/include/sframe-api.h +++ b/include/sframe-api.h @@ -117,7 +117,7 @@ extern unsigned int sframe_decoder_get_hdr_size (sframe_decoder_ctx *dctx); =20 /* Get the SFrame's abi/arch info. */ -extern unsigned char +extern uint8_t sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx); =20 /* Return the number of function descriptor entries in the SFrame decoder @@ -214,7 +214,7 @@ extern unsigned int sframe_encoder_get_hdr_size (sframe_encoder_ctx *encoder); =20 /* Get the abi/arch info from the SFrame encoder context CTX. */ -extern unsigned char +extern uint8_t sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder); =20 /* Return the number of function descriptor entries in the SFrame encoder diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c index 2491b4391f3..37ce9d70eb3 100644 --- a/libsframe/sframe-dump.c +++ b/libsframe/sframe-dump.c @@ -32,9 +32,9 @@ is_sframe_abi_arch_aarch64 (sframe_decoder_ctx *sfd_ctx) { bool aarch64_p =3D false; =20 - unsigned char abi_arch =3D sframe_decoder_get_abi_arch (sfd_ctx); - if ((abi_arch =3D=3D SFRAME_ABI_AARCH64_ENDIAN_BIG) - || (abi_arch =3D=3D SFRAME_ABI_AARCH64_ENDIAN_LITTLE)) + uint8_t abi_arch =3D sframe_decoder_get_abi_arch (sfd_ctx); + if (abi_arch =3D=3D SFRAME_ABI_AARCH64_ENDIAN_BIG + || abi_arch =3D=3D SFRAME_ABI_AARCH64_ENDIAN_LITTLE) aarch64_p =3D true; =20 return aarch64_p; diff --git a/libsframe/sframe.c b/libsframe/sframe.c index 8e9dc0a9d2c..2d7e4a4a462 100644 --- a/libsframe/sframe.c +++ b/libsframe/sframe.c @@ -931,13 +931,13 @@ sframe_decoder_get_hdr_size (sframe_decoder_ctx *ctx) return sframe_get_hdr_size (dhp); } =20 -/* Get the SFrame's abi/arch info given the decoder context CTX. */ +/* Get the SFrame's abi/arch info given the decoder context DCTX. */ =20 -unsigned char -sframe_decoder_get_abi_arch (sframe_decoder_ctx *ctx) +uint8_t +sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx) { sframe_header *sframe_header; - sframe_header =3D sframe_decoder_get_header (ctx); + sframe_header =3D sframe_decoder_get_header (dctx); return sframe_header->sfh_abi_arch; } =20 @@ -1322,10 +1322,10 @@ sframe_encoder_get_hdr_size (sframe_encoder_ctx *en= coder) =20 /* Get the abi/arch info from the SFrame encoder context ENCODER. */ =20 -unsigned char +uint8_t sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder) { - unsigned char abi_arch =3D 0; + uint8_t abi_arch =3D 0; sframe_header *ehp; ehp =3D sframe_encoder_get_header (encoder); if (ehp)