This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/4] libctf: fix the type of ctf_enum.cte_value
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: binutils at sourceware dot org
- Cc: jose dot marchesi at oracle dot com, John dot W dot Marshall at glasgow dot ac dot uk, sebastian dot huber at embedded-brains dot de, nickc at redhat dot com
- Date: Tue, 4 Jun 2019 16:23:49 +0100
- Subject: [PATCH 1/4] libctf: fix the type of ctf_enum.cte_value
- References: <20190604152352.149585-1-nick.alcock@oracle.com>
This stops the file format from depending on the size of the host int.
(It does mean that we cannot encode enums with a value > 2^32 on
platforms with an int > 2^32: this will be fixed in the next format
revision.)
include/
* ctf.h (ctf_enum.cte_value): Fix type to int32_t.
---
include/ChangeLog | 4 ++++
include/ctf.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/ChangeLog b/include/ChangeLog
index 1f216b3821..f84498b590 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-03 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf.h (ctf_enum.cte_value): Fix type to int32_t.
+
2019-05-29 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (ctf_sect_t): Drop cts_type, cts_flags, and cts_offset.
diff --git a/include/ctf.h b/include/ctf.h
index 2c3384fe84..e99a673109 100644
--- a/include/ctf.h
+++ b/include/ctf.h
@@ -507,7 +507,7 @@ typedef struct ctf_lmember_v2
typedef struct ctf_enum
{
uint32_t cte_name; /* Reference to name in string table. */
- int cte_value; /* Value associated with this name. */
+ int32_t cte_value; /* Value associated with this name. */
} ctf_enum_t;
/* The ctf_archive is a collection of ctf_file_t's stored together. The format
--
2.21.0.237.gd0cfaa883d