From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [COMMITTED] libsframe: use uint8_t for return type of sframe_fre_get_base_reg_id
Date: Tue, 27 Jun 2023 12:51:23 -0700 [thread overview]
Message-ID: <20230627195126.1955051-9-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20230627195126.1955051-1-indu.bhagat@oracle.com>
Use a more appropriate data type.
include/
* sframe-api.h (sframe_fre_get_base_reg_id): Use uint8_t as
return type.
libsframe/
* sframe-dump.c (dump_sframe_func_with_fres): Use uint8_t type
for base reg id.
* sframe.c (sframe_fre_get_base_reg_id): Use uin8_t as return
type.
---
include/sframe-api.h | 2 +-
libsframe/sframe-dump.c | 2 +-
libsframe/sframe.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/sframe-api.h b/include/sframe-api.h
index e62a7a38285..46614925c68 100644
--- a/include/sframe-api.h
+++ b/include/sframe-api.h
@@ -173,7 +173,7 @@ extern void
dump_sframe (sframe_decoder_ctx *decoder, uint64_t addr);
/* Get the base reg id from the FRE info. Sets errp if fails. */
-extern unsigned int
+extern uint8_t
sframe_fre_get_base_reg_id (sframe_frame_row_entry *fre, int *errp);
/* Get the CFA offset from the FRE. If the offset is invalid, sets errp. */
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 37ce9d70eb3..4799652f727 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -105,7 +105,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
int32_t cfa_offset = 0;
int32_t fp_offset = 0;
int32_t ra_offset = 0;
- unsigned int base_reg_id = 0;
+ uint8_t base_reg_id = 0;
int err[3] = {0, 0, 0};
sframe_frame_row_entry fre;
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 2d7e4a4a462..b885e3df5ec 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -618,7 +618,7 @@ sframe_calc_fre_type (size_t func_size)
/* Get the base reg id from the FRE info. Set errp if failure. */
-unsigned int
+uint8_t
sframe_fre_get_base_reg_id (sframe_frame_row_entry *fre, int *errp)
{
if (fre == NULL)
--
2.39.2
next prev parent reply other threads:[~2023-06-27 19:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 19:51 [COMMITTED] libsframe: add library versioning Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: remove sframe_get_funcdesc_with_addr API Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: add symbol versioning Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: update the semantics of sframe_fre_get_ra_offset Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: update the semantics of sframe_fre_get_fp_offset Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: use uint32_t for fre_type and fde_type function args Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: bfd: use uint32_t for return type of sframe_calc_fre_type Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: use uint8_t instead of unsigned char for abi_arch Indu Bhagat
2023-06-27 19:51 ` Indu Bhagat [this message]
2023-06-27 19:51 ` [COMMITTED] libsframe: use appropriate data types for args of sframe_encode Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] libsframe: bfd: use uint32_t for return type of get_num_fidx APIs Indu Bhagat
2023-06-27 19:51 ` [COMMITTED] binutils/NEWS: add note about upcoming libsframe changes Indu Bhagat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230627195126.1955051-9-indu.bhagat@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).