mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-18 10:02:23 -07:00
jump destination symbol name visualization in disassembly
This commit is contained in:
@@ -1146,6 +1146,7 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
|
||||
B32 escaped = 0;
|
||||
B32 string_is_char = 0;
|
||||
S32 brace_nest = 0;
|
||||
S32 paren_nest = 0;
|
||||
for(U64 advance = 0; off <= string.size; off += advance)
|
||||
{
|
||||
U8 byte = (off+0 < string.size) ? string.str[off+0] : 0;
|
||||
@@ -1218,6 +1219,14 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
|
||||
{
|
||||
brace_nest -= 1;
|
||||
}
|
||||
if(byte == '(')
|
||||
{
|
||||
paren_nest += 1;
|
||||
}
|
||||
else if(byte == ')')
|
||||
{
|
||||
paren_nest -= 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1306,6 +1315,10 @@ txt_token_array_from_string__disasm_x64_intel(Arena *arena, U64 *bytes_processed
|
||||
{
|
||||
active_token_kind = TXT_TokenKind_Numeric;
|
||||
}
|
||||
if(paren_nest != 0 && active_token_kind == TXT_TokenKind_Keyword)
|
||||
{
|
||||
active_token_kind = TXT_TokenKind_Identifier;
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user