mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
extend binary * voff -> symbol name lookup to include global variable vmap if scope vmap turns up short; extend address visualization rules to more ambitiously visualize what is being pointed at
This commit is contained in:
@@ -3015,7 +3015,7 @@ df_symbol_name_from_binary_voff(Arena *arena, DF_Entity *binary, U64 voff)
|
||||
String8 path = df_full_path_from_entity(scratch.arena, binary);
|
||||
DBGI_Parse *dbgi = dbgi_parse_from_exe_path(scope, path, 0);
|
||||
RADDBG_Parsed *rdbg = &dbgi->rdbg;
|
||||
if(rdbg->scope_vmap != 0)
|
||||
if(result.size == 0 && rdbg->scope_vmap != 0)
|
||||
{
|
||||
U64 scope_idx = raddbg_vmap_idx_from_voff(rdbg->scope_vmap, rdbg->scope_vmap_count, voff);
|
||||
RADDBG_Scope *scope = &rdbg->scopes[scope_idx];
|
||||
@@ -3025,6 +3025,14 @@ df_symbol_name_from_binary_voff(Arena *arena, DF_Entity *binary, U64 voff)
|
||||
U8 *name_ptr = raddbg_string_from_idx(rdbg, procedure->name_string_idx, &name_size);
|
||||
result = push_str8_copy(arena, str8(name_ptr, name_size));
|
||||
}
|
||||
if(result.size == 0 && rdbg->global_vmap != 0)
|
||||
{
|
||||
U64 global_idx = raddbg_vmap_idx_from_voff(rdbg->global_vmap, rdbg->global_vmap_count, voff);
|
||||
RADDBG_GlobalVariable *global_var = &rdbg->global_variables[global_idx];
|
||||
U64 name_size = 0;
|
||||
U8 *name_ptr = raddbg_string_from_idx(rdbg, global_var->name_string_idx, &name_size);
|
||||
result = push_str8_copy(arena, str8(name_ptr, name_size));
|
||||
}
|
||||
dbgi_scope_close(scope);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
+2
-2
@@ -6815,7 +6815,7 @@ df_single_line_eval_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags
|
||||
}
|
||||
|
||||
// rjf: arrow
|
||||
if(did_ptr_value && direct_type_has_content && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules))
|
||||
if(did_ptr_value && (direct_type_has_content || symbol_name.size != 0) && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules))
|
||||
{
|
||||
String8 arrow = str8_lit(" -> ");
|
||||
str8_list_push(arena, &list, arrow);
|
||||
@@ -6835,7 +6835,7 @@ df_single_line_eval_value_strings_from_eval(Arena *arena, DF_EvalVizStringFlags
|
||||
}
|
||||
|
||||
// rjf: special-case: symbols
|
||||
else if(direct_type_has_content && (flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) && symbol_name.size != 0)
|
||||
else if((flags & DF_EvalVizStringFlag_ReadOnlyDisplayRules) && symbol_name.size != 0)
|
||||
{
|
||||
str8_list_push(arena, &list, symbol_name);
|
||||
space_taken += f_dim_from_tag_size_string(font, font_size, symbol_name).x;
|
||||
|
||||
Reference in New Issue
Block a user