From f110bb75910f1548a66dcb2212741480e83d9609 Mon Sep 17 00:00:00 2001 From: Murphy Date: Mon, 11 Mar 2024 09:05:11 -0400 Subject: [PATCH] Memory: Show all printable ASCII in hexdump Previously, only characters in the "word" class were shown in the memory hexdump. These are like alphabetic and numeric characters. Other printable characters like spaces and punctuation were replaced with a ".". This commits shows all printable ASCII characters, and only does the "." replacement for control characters and 127. --- gdbgui/src/js/Memory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbgui/src/js/Memory.tsx b/gdbgui/src/js/Memory.tsx index 0383e9fe..ec1d2a7e 100644 --- a/gdbgui/src/js/Memory.tsx +++ b/gdbgui/src/js/Memory.tsx @@ -85,7 +85,7 @@ class Memory extends React.Component<{}, State> { } let hex_value = store.get("memory_cache")[hex_addr]; hex_vals_for_this_addr.push(hex_value); - let char = String.fromCharCode(parseInt(hex_value, 16)).replace(/\W/g, "."); + let char = String.fromCharCode(parseInt(hex_value, 16)).replace(/[^ -~]/g, "."); char_vals_for_this_addr.push( {char}