[gamecode] Dump void data in hex

This makes dealing with assign instructions much easier.
This commit is contained in:
Bill Currie 2023-09-12 22:16:35 +09:00
parent ea02af57eb
commit d03637ede8
1 changed files with 12 additions and 1 deletions

View File

@ -1254,7 +1254,18 @@ static void
pr_debug_void_view (qfot_type_t *type, pr_type_t *value, void *_data)
{
__auto_type data = (pr_debug_data_t *) _data;
dasprintf (data->dstr, "<void>");
dstring_t *dstr = data->dstr;
if (!type->basic.width) {
dasprintf (dstr, "<void>");
return;
}
for (int i = 0; i < type->basic.width; i++, value++) {
if (i) {
dstring_appendstr (dstr, ", ");
}
dasprintf (dstr, "<%08x>", PR_PTR (int, value));
}
}
static void