reintroduce support for address/code-bytes toggling in disassembly view; also reintroduce support for toggle-watch-expr and goto-name commands

This commit is contained in:
Ryan Fleury
2024-03-29 11:51:20 -07:00
parent eec124c53b
commit c1b92c1b27
5 changed files with 81 additions and 66 deletions
+13
View File
@@ -650,6 +650,7 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
U64 off = 0;
B32 escaped = 0;
B32 string_is_char = 0;
S32 brace_nest = 0;
for(U64 advance = 0; off <= string.size; off += advance)
{
U8 byte = (off+0 < string.size) ? string.str[off+0] : 0;
@@ -708,6 +709,14 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
active_token_start_off = off;
active_token_kind = TXT_TokenKind_Symbol;
advance = 1;
if(byte == '{')
{
brace_nest += 1;
}
else if(byte == '}')
{
brace_nest -= 1;
}
}
else
{
@@ -786,6 +795,10 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
}
if(ender_found != 0)
{
if(brace_nest != 0 && active_token_kind == TXT_TokenKind_Keyword)
{
active_token_kind = TXT_TokenKind_Numeric;
}
TXT_Token token = {active_token_kind, r1u64(active_token_start_off, off+advance)};
txt_token_chunk_list_push(arena, &tokens, 1024, &token);
active_token_kind = TXT_TokenKind_Null;