Page MenuHomeFreeBSD

D62243.1796346362.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D62243.1796346362.diff

diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -1365,7 +1365,7 @@
};
static uint_t
-die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Unsigned enc, size_t sz)
+die_base_type2enc(dwarf_t *dw, Dwarf_Unsigned enc, size_t sz)
{
const fp_size_map_t *map = fp_encodings;
uint_t szidx = dw->dw_ptrsz == sizeof (uint64_t);
@@ -1387,8 +1387,7 @@
map++;
}
- terminate("die %llu: unrecognized real type size %u\n", off, sz);
- /*NOTREACHED*/
+ /* CTF has no encoding for this size. */
return (0);
}
@@ -1430,9 +1429,20 @@
case DW_ATE_SUN_imaginary_float:
case DW_ATE_SUN_interval_float:
#endif
- intr->intr_type = INTR_REAL;
- intr->intr_signed = 1;
- intr->intr_fformat = die_base_type2enc(dw, off, enc, sz);
+ intr->intr_fformat = die_base_type2enc(dw, enc, sz);
+ if (intr->intr_fformat != 0) {
+ intr->intr_type = INTR_REAL;
+ intr->intr_signed = 1;
+ break;
+ }
+ /*
+ * CTF cannot describe this type, such as the 2-byte _Float16
+ * and __bf16. Make it an integer of the same size, so that
+ * types containing it keep their layout.
+ */
+ debug(1, "die %llu: describing %u-byte real type as an "
+ "integer\n", off, (uint_t)sz);
+ intr->intr_type = INTR_INT;
break;
default:
terminate("die %llu: unknown base type encoding 0x%llx\n",

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 4, 1:06 AM (22 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42130488
Default Alt Text
D62243.1796346362.diff (1 KB)

Event Timeline