Self-described pointer types (32 vs 64 bits)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 1 Nov 2022 14:44:35 +0000 (10:44 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 1 Nov 2022 14:44:35 +0000 (10:44 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h
src/tracer.c

index 7f6f04e9fb1aab4e5f68d46b10869b19aace4d73..aa2d3aa2933e6838b61257c0f792c3f87f4d543a 100644 (file)
@@ -45,7 +45,8 @@ enum side_type {
        SIDE_TYPE_S32,
        SIDE_TYPE_S64,
        SIDE_TYPE_BYTE,
-       SIDE_TYPE_POINTER,
+       SIDE_TYPE_POINTER32,
+       SIDE_TYPE_POINTER64,
        SIDE_TYPE_FLOAT_BINARY16,
        SIDE_TYPE_FLOAT_BINARY32,
        SIDE_TYPE_FLOAT_BINARY64,
@@ -67,7 +68,8 @@ enum side_type {
        SIDE_TYPE_ARRAY_S32,
        SIDE_TYPE_ARRAY_S64,
        SIDE_TYPE_ARRAY_BYTE,
-       SIDE_TYPE_ARRAY_POINTER,
+       SIDE_TYPE_ARRAY_POINTER32,
+       SIDE_TYPE_ARRAY_POINTER64,
 
        SIDE_TYPE_VLA_U8,
        SIDE_TYPE_VLA_U16,
@@ -78,7 +80,8 @@ enum side_type {
        SIDE_TYPE_VLA_S32,
        SIDE_TYPE_VLA_S64,
        SIDE_TYPE_VLA_BYTE,
-       SIDE_TYPE_VLA_POINTER,
+       SIDE_TYPE_VLA_POINTER32,
+       SIDE_TYPE_VLA_POINTER64,
 
        /* Enumeration types */
        SIDE_TYPE_ENUM,
@@ -101,7 +104,8 @@ enum side_dynamic_type {
        SIDE_DYNAMIC_TYPE_S32,
        SIDE_DYNAMIC_TYPE_S64,
        SIDE_DYNAMIC_TYPE_BYTE,
-       SIDE_DYNAMIC_TYPE_POINTER,
+       SIDE_DYNAMIC_TYPE_POINTER32,
+       SIDE_DYNAMIC_TYPE_POINTER64,
        SIDE_DYNAMIC_TYPE_FLOAT_BINARY16,
        SIDE_DYNAMIC_TYPE_FLOAT_BINARY32,
        SIDE_DYNAMIC_TYPE_FLOAT_BINARY64,
@@ -126,7 +130,8 @@ enum side_attr_type {
        SIDE_ATTR_TYPE_S16,
        SIDE_ATTR_TYPE_S32,
        SIDE_ATTR_TYPE_S64,
-       SIDE_ATTR_TYPE_POINTER,
+       SIDE_ATTR_TYPE_POINTER32,
+       SIDE_ATTR_TYPE_POINTER64,
        SIDE_ATTR_TYPE_FLOAT_BINARY16,
        SIDE_ATTR_TYPE_FLOAT_BINARY32,
        SIDE_ATTR_TYPE_FLOAT_BINARY64,
@@ -198,7 +203,6 @@ struct side_attr_value {
                int16_t side_s16;
                int32_t side_s32;
                int64_t side_s64;
-               uintptr_t side_pointer;
 #if __HAVE_FLOAT16
                _Float16 side_float_binary16;
 #endif
@@ -352,7 +356,6 @@ struct side_arg_dynamic_vec {
                                int32_t side_s32;
                                int64_t side_s64;
                                uint8_t side_byte;
-                               uintptr_t side_pointer;
 #if __HAVE_FLOAT16
                                _Float16 side_float_binary16;
 #endif
@@ -420,7 +423,6 @@ struct side_arg_vec {
                int32_t side_s32;
                int64_t side_s64;
                uint8_t side_byte;
-               uintptr_t side_pointer;
 #if __HAVE_FLOAT16
                _Float16 side_float_binary16;
 #endif
@@ -480,6 +482,22 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 
 /* Event and type attributes */
 
+#if SIDE_BITS_PER_LONG == 64
+# define SIDE_TYPE_POINTER_HOST                SIDE_TYPE_POINTER64
+# define SIDE_TYPE_ARRAY_POINTER_HOST  SIDE_TYPE_ARRAY_POINTER64
+# define SIDE_TYPE_VLA_POINTER_HOST    SIDE_TYPE_VLA_POINTER64
+# define SIDE_DYNAMIC_TYPE_POINTER_HOST        SIDE_DYNAMIC_TYPE_POINTER64
+# define SIDE_ATTR_TYPE_POINTER_HOST   SIDE_ATTR_TYPE_POINTER64
+# define SIDE_PTR_HOST                 .side_u64
+#else
+# define SIDE_TYPE_POINTER_HOST                SIDE_TYPE_POINTER32
+# define SIDE_TYPE_ARRAY_POINTER_HOST  SIDE_TYPE_ARRAY_POINTER32
+# define SIDE_TYPE_VLA_POINTER_HOST    SIDE_TYPE_VLA_POINTER32
+# define SIDE_DYNAMIC_TYPE_POINTER_HOST        SIDE_DYNAMIC_TYPE_POINTER32
+# define SIDE_ATTR_TYPE_POINTER_HOST   SIDE_ATTR_TYPE_POINTER32
+# define SIDE_PTR_HOST                 .side_u32
+#endif
+
 #define side_attr(_key, _value)        \
        { \
                .key = _key, \
@@ -499,7 +517,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_attr_s16(_val)            { .type = SIDE_ATTR_TYPE_S16, .u = { .side_s16 = (_val) } }
 #define side_attr_s32(_val)            { .type = SIDE_ATTR_TYPE_S32, .u = { .side_s32 = (_val) } }
 #define side_attr_s64(_val)            { .type = SIDE_ATTR_TYPE_S64, .u = { .side_s64 = (_val) } }
-#define side_attr_pointer(_val)                { .type = SIDE_ATTR_TYPE_POINTER, .u = { .side_pointer = (uintptr_t) (_val) } }
+#define side_attr_pointer(_val)                { .type = SIDE_ATTR_TYPE_POINTER_HOST, .u = { SIDE_PTR_HOST = (uintptr_t) (_val) } }
 #define side_attr_float_binary16(_val) { .type = SIDE_ATTR_TYPE_FLOAT_BINARY16, .u = { .side_float_binary16 = (_val) } }
 #define side_attr_float_binary32(_val) { .type = SIDE_ATTR_TYPE_FLOAT_BINARY32, .u = { .side_float_binary32 = (_val) } }
 #define side_attr_float_binary64(_val) { .type = SIDE_ATTR_TYPE_FLOAT_BINARY64, .u = { .side_float_binary64 = (_val) } }
@@ -537,7 +555,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_type_s32(_attr)                           _side_type_basic(SIDE_TYPE_S32, SIDE_TYPE_BYTE_ORDER_HOST, SIDE_PARAM(_attr))
 #define side_type_s64(_attr)                           _side_type_basic(SIDE_TYPE_S64, SIDE_TYPE_BYTE_ORDER_HOST, SIDE_PARAM(_attr))
 #define side_type_byte(_attr)                          _side_type_basic(SIDE_TYPE_BYTE, SIDE_TYPE_BYTE_ORDER_HOST, SIDE_PARAM(_attr))
-#define side_type_pointer(_attr)                       _side_type_basic(SIDE_TYPE_POINTER, SIDE_TYPE_BYTE_ORDER_HOST, SIDE_PARAM(_attr))
+#define side_type_pointer(_attr)                       _side_type_basic(SIDE_TYPE_POINTER_HOST, SIDE_TYPE_BYTE_ORDER_HOST, SIDE_PARAM(_attr))
 #define side_type_float_binary16(_attr)                        _side_type_basic(SIDE_TYPE_FLOAT_BINARY16, SIDE_TYPE_FLOAT_WORD_ORDER_HOST, SIDE_PARAM(_attr))
 #define side_type_float_binary32(_attr)                        _side_type_basic(SIDE_TYPE_FLOAT_BINARY32, SIDE_TYPE_FLOAT_WORD_ORDER_HOST, SIDE_PARAM(_attr))
 #define side_type_float_binary64(_attr)                        _side_type_basic(SIDE_TYPE_FLOAT_BINARY64, SIDE_TYPE_FLOAT_WORD_ORDER_HOST, SIDE_PARAM(_attr))
@@ -570,7 +588,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_type_s16_le(_attr)                                _side_type_basic(SIDE_TYPE_S16, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
 #define side_type_s32_le(_attr)                                _side_type_basic(SIDE_TYPE_S32, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
 #define side_type_s64_le(_attr)                                _side_type_basic(SIDE_TYPE_S64, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
-#define side_type_pointer_le(_attr)                    _side_type_basic(SIDE_TYPE_POINTER, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
+#define side_type_pointer_le(_attr)                    _side_type_basic(SIDE_TYPE_POINTER_HOST, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
 #define side_type_float_binary16_le(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY16, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
 #define side_type_float_binary32_le(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY32, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
 #define side_type_float_binary64_le(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY64, SIDE_TYPE_BYTE_ORDER_LE, SIDE_PARAM(_attr))
@@ -595,7 +613,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_type_s16_be(_attr)                                _side_type_basic(SIDE_TYPE_S16, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
 #define side_type_s32_be(_attr)                                _side_type_basic(SIDE_TYPE_S32, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
 #define side_type_s64_be(_attr)                                _side_type_basic(SIDE_TYPE_S64, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
-#define side_type_pointer_be(_attr)                    _side_type_basic(SIDE_TYPE_POINTER, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
+#define side_type_pointer_be(_attr)                    _side_type_basic(SIDE_TYPE_POINTER_HOST, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
 #define side_type_float_binary16_be(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY16, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
 #define side_type_float_binary32_be(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY32, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
 #define side_type_float_binary64_be(_attr)             _side_type_basic(SIDE_TYPE_FLOAT_BINARY64, SIDE_TYPE_BYTE_ORDER_BE, SIDE_PARAM(_attr))
@@ -726,7 +744,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_arg_s32(_val)             { .type = SIDE_TYPE_S32, .u = { .side_s32 = (_val) } }
 #define side_arg_s64(_val)             { .type = SIDE_TYPE_S64, .u = { .side_s64 = (_val) } }
 #define side_arg_byte(_val)            { .type = SIDE_TYPE_BYTE, .u = { .side_byte = (_val) } }
-#define side_arg_pointer(_val)         { .type = SIDE_TYPE_POINTER, .u = { .side_pointer = (uintptr_t) (_val) } }
+#define side_arg_pointer(_val)         { .type = SIDE_TYPE_POINTER_HOST, .u = { SIDE_PTR_HOST = (uintptr_t) (_val) } }
 #define side_arg_enum_bitmap8(_val)    { .type = SIDE_TYPE_ENUM_BITMAP8, .u = { .side_u8 = (_val) } }
 #define side_arg_enum_bitmap16(_val)   { .type = SIDE_TYPE_ENUM_BITMAP16, .u = { .side_u16 = (_val) } }
 #define side_arg_enum_bitmap32(_val)   { .type = SIDE_TYPE_ENUM_BITMAP32, .u = { .side_u32 = (_val) } }
@@ -753,7 +771,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_arg_array_s32(_ptr)       { .type = SIDE_TYPE_ARRAY_S32, .u = { .side_array_fixint = (_ptr) } }
 #define side_arg_array_s64(_ptr)       { .type = SIDE_TYPE_ARRAY_S64, .u = { .side_array_fixint = (_ptr) } }
 #define side_arg_array_byte(_ptr)      { .type = SIDE_TYPE_ARRAY_BYTE, .u = { .side_array_fixint = (_ptr) } }
-#define side_arg_array_pointer(_ptr)   { .type = SIDE_TYPE_ARRAY_POINTER, .u = { .side_array_fixint = (_ptr) } }
+#define side_arg_array_pointer(_ptr)   { .type = SIDE_TYPE_ARRAY_POINTER_HOST, .u = { .side_array_fixint = (_ptr) } }
 
 #define side_arg_vla_u8(_ptr, _length) { .type = SIDE_TYPE_VLA_U8, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } }
 #define side_arg_vla_u16(_ptr, _length)        { .type = SIDE_TYPE_VLA_U16, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
@@ -764,7 +782,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_arg_vla_s32(_ptr, _length)        { .type = SIDE_TYPE_VLA_S32, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
 #define side_arg_vla_s64(_ptr, _length)        { .type = SIDE_TYPE_VLA_S64, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
 #define side_arg_vla_byte(_ptr, _length) { .type = SIDE_TYPE_VLA_BYTE, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
-#define side_arg_vla_pointer(_ptr, _length) { .type = SIDE_TYPE_VLA_POINTER, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
+#define side_arg_vla_pointer(_ptr, _length) { .type = SIDE_TYPE_VLA_POINTER_HOST, .u = { .side_vla_fixint = { .p = (_ptr), .length = (_length) } } }
 
 #define side_arg_dynamic(_dynamic_arg_type) \
        { \
@@ -947,14 +965,14 @@ struct side_tracer_dynamic_vla_visitor_ctx {
        }
 #define _side_arg_dynamic_pointer(_val, _byte_order, _attr) \
        { \
-               .dynamic_type = SIDE_DYNAMIC_TYPE_POINTER, \
+               .dynamic_type = SIDE_DYNAMIC_TYPE_POINTER_HOST, \
                .u = { \
                        .side_basic = { \
                                .attr = _attr, \
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_pointer = (uintptr_t) (_val), \
+                                       SIDE_PTR_HOST = (uintptr_t) (_val), \
                                }, \
                        }, \
                }, \
index 7afef3594949d2337e4ded6ecd1739922fd20d03..e8845866d2c4a03dbd7687047927de8a05d1c17c 100644 (file)
@@ -44,7 +44,8 @@ bool type_to_host_reverse_bo(const struct side_type_description *type_desc)
         case SIDE_TYPE_S16:
         case SIDE_TYPE_S32:
         case SIDE_TYPE_S64:
-        case SIDE_TYPE_POINTER:
+        case SIDE_TYPE_POINTER32:
+        case SIDE_TYPE_POINTER64:
                if (type_desc->u.side_basic.byte_order != SIDE_TYPE_BYTE_ORDER_HOST)
                        return true;
                else
@@ -79,7 +80,8 @@ bool dynamic_type_to_host_reverse_bo(const struct side_arg_dynamic_vec *item)
         case SIDE_DYNAMIC_TYPE_S16:
         case SIDE_DYNAMIC_TYPE_S32:
         case SIDE_DYNAMIC_TYPE_S64:
-        case SIDE_DYNAMIC_TYPE_POINTER:
+        case SIDE_DYNAMIC_TYPE_POINTER32:
+        case SIDE_DYNAMIC_TYPE_POINTER64:
                if (item->u.side_basic.byte_order != SIDE_TYPE_BYTE_ORDER_HOST)
                        return true;
                else
@@ -132,8 +134,11 @@ void tracer_print_attr_type(const char *separator, const struct side_attr *attr)
        case SIDE_ATTR_TYPE_S64:
                printf("%" PRId64, attr->value.u.side_s64);
                break;
-       case SIDE_ATTR_TYPE_POINTER:
-               printf("0x%" PRIxPTR, attr->value.u.side_pointer);
+       case SIDE_ATTR_TYPE_POINTER32:
+               printf("0x%" PRIx32, attr->value.u.side_u32);
+               break;
+       case SIDE_ATTR_TYPE_POINTER64:
+               printf("0x%" PRIx64, attr->value.u.side_u64);
                break;
        case SIDE_ATTR_TYPE_FLOAT_BINARY16:
 #if __HAVE_FLOAT16
@@ -461,7 +466,8 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
                case SIDE_TYPE_ARRAY_S16:
                case SIDE_TYPE_ARRAY_S32:
                case SIDE_TYPE_ARRAY_S64:
-               case SIDE_TYPE_ARRAY_POINTER:
+               case SIDE_TYPE_ARRAY_POINTER32:
+               case SIDE_TYPE_ARRAY_POINTER64:
                case SIDE_TYPE_ARRAY_BYTE:
                case SIDE_TYPE_ARRAY:
                        break;
@@ -483,7 +489,8 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
                case SIDE_TYPE_VLA_S32:
                case SIDE_TYPE_VLA_S64:
                case SIDE_TYPE_VLA_BYTE:
-               case SIDE_TYPE_VLA_POINTER:
+               case SIDE_TYPE_VLA_POINTER32:
+               case SIDE_TYPE_VLA_POINTER64:
                case SIDE_TYPE_VLA:
                        break;
                default:
@@ -621,15 +628,26 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
                printf("%" PRId64, v);
                break;
        }
-       case SIDE_TYPE_POINTER:
+       case SIDE_TYPE_POINTER32:
        {
-               uintptr_t v;
+               uint32_t v;
 
-               v = item->u.side_pointer;
+               v = item->u.side_u32;
                if (type_to_host_reverse_bo(type_desc))
-                       v = side_bswap_pointer(v);
+                       v = side_bswap_32(v);
                tracer_print_basic_type_header(type_desc);
-               printf("0x%" PRIxPTR, v);
+               printf("0x%" PRIx32, v);
+               break;
+       }
+       case SIDE_TYPE_POINTER64:
+       {
+               uint64_t v;
+
+               v = item->u.side_u64;
+               if (type_to_host_reverse_bo(type_desc))
+                       v = side_bswap_64(v);
+               tracer_print_basic_type_header(type_desc);
+               printf("0x%" PRIx64, v);
                break;
        }
        case SIDE_TYPE_BYTE:
@@ -750,7 +768,8 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
        case SIDE_TYPE_ARRAY_S32:
        case SIDE_TYPE_ARRAY_S64:
        case SIDE_TYPE_ARRAY_BYTE:
-       case SIDE_TYPE_ARRAY_POINTER:
+       case SIDE_TYPE_ARRAY_POINTER32:
+       case SIDE_TYPE_ARRAY_POINTER64:
                tracer_print_array_fixint(type_desc, item);
                break;
        case SIDE_TYPE_VLA_U8:
@@ -762,7 +781,8 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
        case SIDE_TYPE_VLA_S32:
        case SIDE_TYPE_VLA_S64:
        case SIDE_TYPE_VLA_BYTE:
-       case SIDE_TYPE_VLA_POINTER:
+       case SIDE_TYPE_VLA_POINTER32:
+       case SIDE_TYPE_VLA_POINTER64:
                tracer_print_vla_fixint(type_desc, item);
                break;
        case SIDE_TYPE_DYNAMIC:
@@ -936,8 +956,11 @@ void tracer_print_array_fixint(const struct side_type_description *type_desc, co
                if (elem_type->type != SIDE_TYPE_BYTE)
                        goto type_error;
                break;
-       case SIDE_TYPE_ARRAY_POINTER:
-               if (elem_type->type != SIDE_TYPE_POINTER)
+       case SIDE_TYPE_ARRAY_POINTER32:
+               if (elem_type->type != SIDE_TYPE_POINTER32)
+                       goto type_error;
+       case SIDE_TYPE_ARRAY_POINTER64:
+               if (elem_type->type != SIDE_TYPE_POINTER64)
                        goto type_error;
                break;
        default:
@@ -979,8 +1002,11 @@ void tracer_print_array_fixint(const struct side_type_description *type_desc, co
                case SIDE_TYPE_BYTE:
                        sav_elem.u.side_byte = ((const uint8_t *) p)[i];
                        break;
-               case SIDE_TYPE_POINTER:
-                       sav_elem.u.side_pointer = ((const uintptr_t *) p)[i];
+               case SIDE_TYPE_POINTER32:
+                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       break;
+               case SIDE_TYPE_POINTER64:
+                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
                        break;
 
                default:
@@ -1047,8 +1073,11 @@ void tracer_print_vla_fixint(const struct side_type_description *type_desc, cons
                if (elem_type->type != SIDE_TYPE_BYTE)
                        goto type_error;
                break;
-       case SIDE_TYPE_VLA_POINTER:
-               if (elem_type->type != SIDE_TYPE_POINTER)
+       case SIDE_TYPE_VLA_POINTER32:
+               if (elem_type->type != SIDE_TYPE_POINTER32)
+                       goto type_error;
+       case SIDE_TYPE_VLA_POINTER64:
+               if (elem_type->type != SIDE_TYPE_POINTER64)
                        goto type_error;
                break;
        default:
@@ -1090,8 +1119,11 @@ void tracer_print_vla_fixint(const struct side_type_description *type_desc, cons
                case SIDE_TYPE_BYTE:
                        sav_elem.u.side_byte = ((const uint8_t *) p)[i];
                        break;
-               case SIDE_TYPE_POINTER:
-                       sav_elem.u.side_pointer = ((const uintptr_t *) p)[i];
+               case SIDE_TYPE_POINTER32:
+                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       break;
+               case SIDE_TYPE_POINTER64:
+                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
                        break;
 
                default:
@@ -1335,15 +1367,27 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
                tracer_print_dynamic_basic_type_header(item);
                printf("0x%" PRIx8, item->u.side_basic.u.side_byte);
                break;
-       case SIDE_DYNAMIC_TYPE_POINTER:
+       case SIDE_DYNAMIC_TYPE_POINTER32:
        {
-               uintptr_t v;
+               uint32_t v;
 
-               v = item->u.side_basic.u.side_pointer;
+               v = item->u.side_basic.u.side_u32;
                if (dynamic_type_to_host_reverse_bo(item))
-                       v = side_bswap_pointer(v);
+                       v = side_bswap_32(v);
+               tracer_print_dynamic_basic_type_header(item);
+               printf("0x%" PRIx32, v);
+               break;
+       }
+
+       case SIDE_DYNAMIC_TYPE_POINTER64:
+       {
+               uint64_t v;
+
+               v = item->u.side_basic.u.side_u64;
+               if (dynamic_type_to_host_reverse_bo(item))
+                       v = side_bswap_64(v);
                tracer_print_dynamic_basic_type_header(item);
-               printf("0x%" PRIxPTR, v);
+               printf("0x%" PRIx64, v);
                break;
        }
 
This page took 0.029552 seconds and 4 git commands to generate.