aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-06-15 17:05:11 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2023-06-23 09:37:48 -0700
commit4d5e6646a42c94de141d3b15058f79ab5b6c5938 (patch)
treee4e600841a54b4706e38dc481c1399cde6b665f9
parentdc7b82cac5224fe83f1340685b3a8c2faed8c4c4 (diff)
downloadgdb-4d5e6646a42c94de141d3b15058f79ab5b6c5938.zip
gdb-4d5e6646a42c94de141d3b15058f79ab5b6c5938.tar.gz
gdb-4d5e6646a42c94de141d3b15058f79ab5b6c5938.tar.bz2
libsframe: use uint8_t instead of unsigned char for abi_arch
Use uint8_t consistently for identifying ABI/arch in SFrame format. 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.
-rw-r--r--bfd/elf-sframe.c2
-rw-r--r--include/sframe-api.h4
-rw-r--r--libsframe/sframe-dump.c6
-rw-r--r--libsframe/sframe.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c
index 57d6798..069f756 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 = 0;
diff --git a/include/sframe-api.h b/include/sframe-api.h
index 70829ec..e62a7a3 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);
/* Get the SFrame's abi/arch info. */
-extern unsigned char
+extern uint8_t
sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx);
/* 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);
/* 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);
/* Return the number of function descriptor entries in the SFrame encoder
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 2491b43..37ce9d7 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 = false;
- unsigned char abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
- if ((abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG)
- || (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE))
+ uint8_t abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
+ if (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG
+ || abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE)
aarch64_p = true;
return aarch64_p;
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 8e9dc0a..7bb8c64 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -933,7 +933,7 @@ sframe_decoder_get_hdr_size (sframe_decoder_ctx *ctx)
/* Get the SFrame's abi/arch info given the decoder context CTX. */
-unsigned char
+uint8_t
sframe_decoder_get_abi_arch (sframe_decoder_ctx *ctx)
{
sframe_header *sframe_header;
@@ -1322,10 +1322,10 @@ sframe_encoder_get_hdr_size (sframe_encoder_ctx *encoder)
/* Get the abi/arch info from the SFrame encoder context ENCODER. */
-unsigned char
+uint8_t
sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder)
{
- unsigned char abi_arch = 0;
+ uint8_t abi_arch = 0;
sframe_header *ehp;
ehp = sframe_encoder_get_header (encoder);
if (ehp)