I tried creating an option field class with unsigned integer selector,
with a [1, UINT64_MAX] range. The details field class shows it as:
opt_with_uint_sel: Option (unsigned integer selector) (Selector field location [Event payload: uint_selector]):
Selector ranges: [1, -1]
The -1 is wrong. Fix two spots to call write_uint_prop_value instead of
write_int_prop_value.
After:
opt_with_uint_sel: Option (unsigned integer selector) (Selector field location [Event payload: uint_selector]):
Selector ranges: [1, 18,446,744,073,709,551,615]
Change-Id: I83344b2a241f597da86c21da030b40eed2a4955f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7228
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
if (is_signed) {
write_int_prop_value(ctx, range->lower.i);
} else {
- write_int_prop_value(ctx, range->lower.u);
+ write_uint_prop_value(ctx, range->lower.u);
}
if (range->lower.u != range->upper.u) {
if (is_signed) {
write_int_prop_value(ctx, range->upper.i);
} else {
- write_int_prop_value(ctx, range->upper.u);
+ write_uint_prop_value(ctx, range->upper.u);
}
}