git: 258a0d760aa8 - main - ctfconvert: Integer encoding types are unsigned

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 28 Jun 2023 20:47:34 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=258a0d760aa8b42899a000e30f610f900a402556

commit 258a0d760aa8b42899a000e30f610f900a402556
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-06-06 17:28:02 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-06-28 20:29:49 +0000

    ctfconvert: Integer encoding types are unsigned
    
    Before this change, encodings in the user-defined range were being
    sign-extended.
    
    MFC after:      1 week
    Sponsored by:   Innovate UK
---
 cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 67866555ae5d..ec5a3c58856d 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -1367,7 +1367,7 @@ static const fp_size_map_t fp_encodings[] = {
 };
 
 static uint_t
-die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Signed enc, size_t sz)
+die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Unsigned enc, size_t sz)
 {
 	const fp_size_map_t *map = fp_encodings;
 	uint_t szidx = dw->dw_ptrsz == sizeof (uint64_t);
@@ -1398,9 +1398,9 @@ static intr_t *
 die_base_from_dwarf(dwarf_t *dw, Dwarf_Die base, Dwarf_Off off, size_t sz)
 {
 	intr_t *intr = xcalloc(sizeof (intr_t));
-	Dwarf_Signed enc;
+	Dwarf_Unsigned enc;
 
-	(void) die_signed(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ);
+	(void) die_unsigned(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ);
 
 	switch (enc) {
 	case DW_ATE_unsigned: