char padding[USTCTL_UST_FLOAT_TYPE_PADDING];
} LTTNG_PACKED;
+#define USTCTL_UST_ENUM_VALUE_PADDING 15
+struct ustctl_enum_value {
+ uint64_t value;
+ uint8_t signedness;
+ char padding[USTCTL_UST_ENUM_VALUE_PADDING];
+} LTTNG_PACKED;
+
#define USTCTL_UST_ENUM_ENTRY_PADDING 32
struct ustctl_enum_entry {
- uint64_t start, end; /* start and end are inclusive */
+ struct ustctl_enum_value start, end; /* start and end are inclusive */
char string[LTTNG_UST_SYM_NAME_LEN];
char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
-};
+} LTTNG_PACKED;
#define USTCTL_UST_BASIC_TYPE_PADDING 296
union _ustctl_basic_type {
if (ret) {
goto end;
}
- if (entry->start == entry->end) {
+
+ if (entry->start.signedness) {
ret = lttng_metadata_printf(session,
- "%d,\n",
- entry->start);
+ "%lld", (long long) entry->start.value);
} else {
ret = lttng_metadata_printf(session,
- "%d ... %d,\n",
- entry->start, entry->end);
+ "%llu", entry->start.value);
+ }
+ if (ret) {
+ goto end;
+ }
+
+ if (entry->start.signedness == entry->end.signedness &&
+ entry->start.value == entry->end.value) {
+ ret = lttng_metadata_printf(session,
+ ",\n");
+ } else {
+ if (entry->end.signedness) {
+ ret = lttng_metadata_printf(session,
+ " ... %lld,\n", (long long) entry->end.value);
+ } else {
+ ret = lttng_metadata_printf(session,
+ " ... %llu,\n", entry->end.value);
+ }
}
if (ret) {
goto end;
entries_a = ®_enum_a->entries[i];
entries_b = ®_enum_b->entries[i];
- if (entries_a->start != entries_b->start) {
+ if (entries_a->start.value != entries_b->start.value) {
ret = -1;
goto end;
}
- if (entries_a->end != entries_b->end) {
+ if (entries_a->end.value != entries_b->end.value) {
ret = -1;
goto end;
}
+ if (entries_a->start.signedness != entries_b->start.signedness) {
+ ret = -1;
+ goto end;
+ }
+ if (entries_a->end.signedness != entries_b->end.signedness) {
+ ret = -1;
+ goto end;
+ }
+
if (strcmp(entries_a->string, entries_b->string)) {
ret = -1;
goto end;