From d03637ede85ae61cb26170be6a7bb6b060ca56e0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 12 Sep 2023 22:16:35 +0900 Subject: [PATCH] [gamecode] Dump void data in hex This makes dealing with assign instructions much easier. --- libs/gamecode/pr_debug.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/gamecode/pr_debug.c b/libs/gamecode/pr_debug.c index f256e937e..9f7344a75 100644 --- a/libs/gamecode/pr_debug.c +++ b/libs/gamecode/pr_debug.c @@ -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, ""); + dstring_t *dstr = data->dstr; + + if (!type->basic.width) { + dasprintf (dstr, ""); + 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