di2 -> di; delete old dbg info layer, delete async layer

This commit is contained in:
Ryan Fleury
2025-10-01 17:30:08 -07:00
parent 544fea0929
commit a58c23754a
26 changed files with 1539 additions and 4378 deletions
+1 -1
View File
@@ -520,7 +520,7 @@ Rng1U64 rd_reg_slot_range_table[47] =
{OffsetOf(RD_Regs, text_key), OffsetOf(RD_Regs, text_key) + sizeof(C_Key)},
{OffsetOf(RD_Regs, lang_kind), OffsetOf(RD_Regs, lang_kind) + sizeof(TXT_LangKind)},
{OffsetOf(RD_Regs, lines), OffsetOf(RD_Regs, lines) + sizeof(D_LineList)},
{OffsetOf(RD_Regs, dbgi_key), OffsetOf(RD_Regs, dbgi_key) + sizeof(DI2_Key)},
{OffsetOf(RD_Regs, dbgi_key), OffsetOf(RD_Regs, dbgi_key) + sizeof(DI_Key)},
{OffsetOf(RD_Regs, vaddr), OffsetOf(RD_Regs, vaddr) + sizeof(U64)},
{OffsetOf(RD_Regs, voff), OffsetOf(RD_Regs, voff) + sizeof(U64)},
{OffsetOf(RD_Regs, vaddr_range), OffsetOf(RD_Regs, vaddr_range) + sizeof(Rng1U64)},
+1 -1
View File
@@ -466,7 +466,7 @@ TxtPt mark;
C_Key text_key;
TXT_LangKind lang_kind;
D_LineList lines;
DI2_Key dbgi_key;
DI_Key dbgi_key;
U64 vaddr;
U64 voff;
Rng1U64 vaddr_range;
+1 -1
View File
@@ -736,7 +736,7 @@ RD_RegTable:
{C_Key text_key TextKey }
{TXT_LangKind lang_kind LangKind }
{D_LineList lines Lines }
{DI2_Key dbgi_key DbgiKey }
{DI_Key dbgi_key DbgiKey }
{U64 vaddr Vaddr }
{U64 voff Voff }
{Rng1U64 vaddr_range VaddrRange }
+17 -17
View File
@@ -3273,11 +3273,11 @@ rd_view_ui(Rng2F32 rect)
U64 vaddr = eval.value.u64;
CTRL_Entity *process = rd_ctrl_entity_from_eval_space(eval.space);
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
U64 voff = ctrl_voff_from_vaddr(module, vaddr);
{
Access *access = access_open();
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
String8 name = {0};
if(name.size == 0)
{
@@ -3360,11 +3360,11 @@ rd_view_ui(Rng2F32 rect)
U64 vaddr = eval.value.u64;
CTRL_Entity *process = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_regs()->process);
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
U64 voff = ctrl_voff_from_vaddr(module, vaddr);
{
Access *access = access_open();
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 1, 0);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 1, 0);
if(name.size == 0)
{
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, voff);
@@ -5298,7 +5298,7 @@ rd_view_ui(Rng2F32 rect)
{
U64 vaddr = cell->eval.value.u64;
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
U64 voff = ctrl_voff_from_vaddr(module, vaddr);
D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, dbgi_key, voff);
String8 file_path = {0};
@@ -6444,8 +6444,8 @@ rd_window_frame(void)
{
Access *access = access_open();
CTRL_Entity *dbg_info_entity = ctrl_entity_child_from_kind(ctrl_entity, CTRL_EntityKind_DebugInfoPath);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(ctrl_entity);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(ctrl_entity);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
if(rdi->raw_data_size != 0)
{
ui_labelf("Symbols successfully loaded from %S", dbg_info_entity->string);
@@ -10311,7 +10311,7 @@ rd_code_color_slot_from_txt_token_kind_lookup_string(TXT_TokenKind kind, String8
// rjf: try to map using asynchronous matching system
if(!mapped && kind == TXT_TokenKind_Identifier)
{
DI2_Match match = di2_match_from_string(string, 0, 0);
DI_Match match = di_match_from_string(string, 0, 0);
RDI_SectionKind section_kind = match.section_kind;
mapped = 1;
switch(section_kind)
@@ -11872,15 +11872,15 @@ rd_frame(void)
E_Module *eval_modules_primary = &eval_modules[0];
eval_modules_primary->rdi = &rdi_parsed_nil;
eval_modules_primary->vaddr_range = r1u64(0, max_U64);
DI2_Key primary_dbgi_key = {0};
DI_Key primary_dbgi_key = {0};
ProfScope("produce all eval modules")
{
for EachIndex(eval_module_idx, all_modules.count)
{
CTRL_Entity *m = all_modules.v[eval_module_idx];
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(m);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(m);
eval_modules[eval_module_idx].arch = m->arch;
eval_modules[eval_module_idx].rdi = di2_rdi_from_key(rd_state->frame_access, dbgi_key, 0, 0);
eval_modules[eval_module_idx].rdi = di_rdi_from_key(rd_state->frame_access, dbgi_key, 0, 0);
eval_modules[eval_module_idx].vaddr_range = m->vaddr_range;
eval_modules[eval_module_idx].space = rd_eval_space_from_ctrl_entity(ctrl_entity_ancestor_from_kind(m, CTRL_EntityKind_Process), RD_EvalSpaceKind_CtrlEntity);
if(module == m)
@@ -14678,8 +14678,8 @@ rd_frame(void)
U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_index);
CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process);
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, rip_vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
U64 rip_voff = ctrl_voff_from_vaddr(module, rip_vaddr);
D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, dbgi_key, rip_voff);
D_Line line = {0};
@@ -14695,7 +14695,7 @@ rd_frame(void)
}
}
B32 missing_rip = (rip_vaddr == 0);
B32 dbgi_missing = (di2_key_match(di2_key_zero(), dbgi_key));
B32 dbgi_missing = (di_key_match(di_key_zero(), dbgi_key));
B32 dbgi_pending = !dbgi_missing && rdi == &rdi_parsed_nil;
B32 has_line_info = (line.voff_range.max != 0);
B32 has_module = (module != &ctrl_entity_nil);
@@ -14759,16 +14759,16 @@ rd_frame(void)
// rjf: try to resolve name as a symbol
U64 voff = 0;
DI2_Key voff_dbgi_key = {0};
DI_Key voff_dbgi_key = {0};
if(!name_resolved)
{
DI2_Match match = di2_match_from_string(name, 0, 0);
DI_Match match = di_match_from_string(name, 0, 0);
if(match.section_kind == RDI_SectionKind_Procedures)
{
Access *access = access_open();
{
name_resolved = 1;
RDI_Parsed *rdi = di2_rdi_from_key(access, match.key, 0, 0);
RDI_Parsed *rdi = di_rdi_from_key(access, match.key, 0, 0);
RDI_Procedure *procedure = rdi_element_from_name_idx(rdi, Procedures, match.idx);
voff = rdi_first_voff_from_procedure(rdi, procedure);
voff_dbgi_key = match.key;
+5 -5
View File
@@ -1634,7 +1634,7 @@ typedef struct RD_DebugInfoTableLookupAccel RD_DebugInfoTableLookupAccel;
struct RD_DebugInfoTableLookupAccel
{
RDI_SectionKind section;
DI2_SearchItemArray items;
DI_SearchItemArray items;
};
E_TYPE_EXPAND_INFO_FUNCTION_DEF(debug_info_table)
@@ -1662,12 +1662,12 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(debug_info_table)
U64 endt_us = rd_state->frame_eval_memread_endt_us;
U128 fuzzy_search_key = {d_hash_from_string(str8_struct(&rd_regs()->view)), (U64)section};
accel->section = section;
accel->items = di2_search_item_array_from_target_query(rd_state->frame_access, section, filter, endt_us);
accel->items = di_search_item_array_from_target_query(rd_state->frame_access, section, filter, endt_us);
RD_ViewState *vs = rd_view_state_from_cfg(rd_cfg_from_id(rd_regs()->view));
if(accel->items.count == 0)
{
String8 last_query = str8(vs->last_successful_query_buffer, vs->last_successful_query_string_size);
accel->items = di2_search_item_array_from_target_query(rd_state->frame_access, section, last_query, endt_us);
accel->items = di_search_item_array_from_target_query(rd_state->frame_access, section, last_query, endt_us);
}
else
{
@@ -1691,8 +1691,8 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(debug_info_table)
Access *access = access_open();
// rjf: unpack row
DI2_SearchItem *item = &accel->items.v[idx_range.min + idx];
RDI_Parsed *rdi = di2_rdi_from_key(access, item->key, 0, 0);
DI_SearchItem *item = &accel->items.v[idx_range.min + idx];
RDI_Parsed *rdi = di_rdi_from_key(access, item->key, 0, 0);
// rjf: get item's string
String8 item_string = {0};
+3 -5
View File
@@ -219,7 +219,6 @@
#include "base/base_inc.h"
#include "linker/hash_table.h"
#include "os/os_inc.h"
#include "async/async.h"
#include "artifact_cache/artifact_cache.h"
#include "rdi/rdi_local.h"
#include "rdi_make/rdi_make_local.h"
@@ -248,7 +247,7 @@
#include "radbin/radbin.h"
#include "regs/regs.h"
#include "regs/rdi/regs_rdi.h"
#include "dbg_info/dbg_info2.h"
#include "dbg_info/dbg_info.h"
#include "disasm/disasm.h"
#include "demon/demon_inc.h"
#include "eval/eval_inc.h"
@@ -266,7 +265,6 @@
#include "base/base_inc.c"
#include "linker/hash_table.c"
#include "os/os_inc.c"
#include "async/async.c"
#include "artifact_cache/artifact_cache.c"
#include "rdi/rdi_local.c"
#include "rdi_make/rdi_make_local.c"
@@ -295,7 +293,7 @@
#include "radbin/radbin.c"
#include "regs/regs.c"
#include "regs/rdi/regs_rdi.c"
#include "dbg_info/dbg_info2.c"
#include "dbg_info/dbg_info.c"
#include "disasm/disasm.c"
#include "demon/demon_inc.c"
#include "eval/eval_inc.c"
@@ -749,7 +747,7 @@ entry_point(CmdLine *cmd_line)
case ExecMode_BinaryUtility:
{
rb_entry_point(cmd_line);
di2_signal_completion();
di_signal_completion();
}break;
//- rjf: help message box
+19 -19
View File
@@ -20,7 +20,7 @@ rd_code_view_init(RD_CodeViewState *cv)
}
internal RD_CodeViewBuildResult
rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI2_Key dasm_dbgi_key)
rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key)
{
ProfBeginFunction();
Temp scratch = scratch_begin(&arena, 1);
@@ -289,7 +289,7 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
U64 last_inst_on_unwound_rip_vaddr = rip_vaddr - !!unwind_count;
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, last_inst_on_unwound_rip_vaddr);
U64 rip_voff = ctrl_voff_from_vaddr(module, last_inst_on_unwound_rip_vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, dbgi_key, rip_voff);
for(D_LineNode *n = lines.first; n != 0; n = n->next)
{
@@ -341,7 +341,7 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
{
String8 file_path = rd_regs()->file_path;
CTRL_Entity *module = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_regs()->module);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
D_LineListArray lines_array = d_lines_array_from_dbgi_key_file_path_line_range(scratch.arena, dbgi_key, file_path, visible_line_num_range);
if(lines_array.count != 0)
{
@@ -423,7 +423,7 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
if(dasm_lines)
{
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, dasm_vaddr_range.min);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
for(S64 line_num = visible_line_num_range.min; line_num < visible_line_num_range.max; line_num += 1)
{
U64 vaddr = dasm_vaddr_range.min + dasm_line_array_code_off_from_idx(dasm_lines, line_num-1);
@@ -437,7 +437,7 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
// rjf: add dasm dbgi key to relevant dbgis
if(dasm_lines != 0)
{
di2_key_list_push(scratch.arena, &code_slice_params.relevant_dbgi_keys, dasm_dbgi_key);
di_key_list_push(scratch.arena, &code_slice_params.relevant_dbgi_keys, dasm_dbgi_key);
}
}
@@ -813,9 +813,9 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
//
RD_CodeViewBuildResult result = {0};
{
for(DI2_KeyNode *n = code_slice_params.relevant_dbgi_keys.first; n != 0; n = n->next)
for(DI_KeyNode *n = code_slice_params.relevant_dbgi_keys.first; n != 0; n = n->next)
{
di2_key_list_push(arena, &result.dbgi_keys, n->v);
di_key_list_push(arena, &result.dbgi_keys, n->v);
}
}
@@ -2147,7 +2147,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
//////////////////////////////
//- rjf: build code contents
//
DI2_KeyList dbgi_keys = {0};
DI_KeyList dbgi_keys = {0};
if(!file_is_missing)
{
RD_CodeViewBuildFlags flags = RD_CodeViewBuildFlag_All;
@@ -2155,7 +2155,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
{
flags &= ~RD_CodeViewBuildFlag_Margins;
}
RD_CodeViewBuildResult result = rd_code_view_build(scratch.arena, cv, flags, code_area_rect, data, &info, 0, r1u64(0, 0), di2_key_zero());
RD_CodeViewBuildResult result = rd_code_view_build(scratch.arena, cv, flags, code_area_rect, data, &info, 0, r1u64(0, 0), di_key_zero());
dbgi_keys = result.dbgi_keys;
}
@@ -2165,7 +2165,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
if(rd_regs()->file_path.size != 0)
{
CTRL_Entity *module = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_regs()->module);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
rd_regs()->lines = d_lines_from_dbgi_key_file_path_line_num(rd_frame_arena(), dbgi_key, rd_regs()->file_path, rd_regs()->cursor.line);
}
@@ -2178,9 +2178,9 @@ RD_VIEW_UI_FUNCTION_DEF(text)
U64 file_timestamp = os_properties_from_file_path(rd_regs()->file_path).modified;
if(file_timestamp != 0)
{
for(DI2_KeyNode *n = dbgi_keys.first; n != 0; n = n->next)
for(DI_KeyNode *n = dbgi_keys.first; n != 0; n = n->next)
{
DI2_Key key = n->v;
DI_Key key = n->v;
// TODO(rjf): @dbgi2
#if 0
if(key.min_timestamp < file_timestamp && key.min_timestamp != 0 && key.path.size != 0)
@@ -2358,7 +2358,7 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
Arch arch = rd_arch_from_eval(eval);
CTRL_Entity *space_entity = rd_ctrl_entity_from_eval_space(space);
CTRL_Entity *dasm_module = &ctrl_entity_nil;
DI2_Key dbgi_key = {0};
DI_Key dbgi_key = {0};
U64 base_vaddr = 0;
switch(space_entity->kind)
{
@@ -2958,8 +2958,8 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
U64 f_rip_vaddr = regs_rip_from_arch_block(selected_thread->arch, f->regs);
CTRL_Entity *module = ctrl_module_from_process_vaddr(selected_process, f_rip_vaddr);
U64 f_rip_voff = ctrl_voff_from_vaddr(module, f_rip_vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, f_rip_voff);
String8 procedure_name = {0};
procedure_name.str = rdi_string_from_idx(rdi, procedure->name_string_idx, &procedure_name.size);
@@ -3071,8 +3071,8 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
if(module != &ctrl_entity_nil)
{
U64 voff = ctrl_voff_from_vaddr(module, vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, voff);
RDI_Scope *root_scope = rdi_element_from_name_idx(rdi, Scopes, procedure->root_scope_idx);
if(procedure->root_scope_idx != 0)
@@ -3128,8 +3128,8 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
if(module != &ctrl_entity_nil)
{
U64 voff = ctrl_voff_from_vaddr(module, vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
RDI_GlobalVariable *gvar = rdi_global_variable_from_voff(rdi, voff);
if(gvar->voff != 0)
{
+2 -2
View File
@@ -67,7 +67,7 @@ struct RD_CodeViewState
typedef struct RD_CodeViewBuildResult RD_CodeViewBuildResult;
struct RD_CodeViewBuildResult
{
DI2_KeyList dbgi_keys;
DI_KeyList dbgi_keys;
};
////////////////////////////////
@@ -199,7 +199,7 @@ struct RD_WatchViewState
//~ rjf: Code View Functions
internal void rd_code_view_init(RD_CodeViewState *cv);
internal RD_CodeViewBuildResult rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI2_Key dasm_dbgi_key);
internal RD_CodeViewBuildResult rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key);
////////////////////////////////
//~ rjf: Watch View Functions
+9 -9
View File
@@ -563,8 +563,8 @@ rd_title_fstrs_from_ctrl_entity(Arena *arena, CTRL_Entity *entity, B32 include_e
U64 rip_voff = ctrl_voff_from_vaddr(module, rip_vaddr);
String8 name = {0};
{
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
if(rdi != &rdi_parsed_nil)
{
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, rip_voff);
@@ -597,8 +597,8 @@ rd_title_fstrs_from_ctrl_entity(Arena *arena, CTRL_Entity *entity, B32 include_e
if(entity->kind == CTRL_EntityKind_Module && include_extras)
{
Access *access = access_open();
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(entity);
RDI_Parsed *rdi = di2_rdi_from_key(access, dbgi_key, 0, 0);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(entity);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
if(rdi->raw_data_size == 0)
{
dr_fstrs_push_new(arena, &result, &params, str8_lit(" "));
@@ -1417,7 +1417,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count);
CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process);
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, thread_rip_vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
U64 thread_rip_voff = ctrl_voff_from_vaddr(module, thread_rip_vaddr);
// rjf: thread info => color
@@ -1488,7 +1488,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
D_Line *line = 0;
for(D_LineNode *n = lines->first; n != 0; n = n->next)
{
if(di2_key_match(n->v.dbgi_key, dbgi_key))
if(di_key_match(n->v.dbgi_key, dbgi_key))
{
line = &n->v;
break;
@@ -1573,7 +1573,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count);
CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process);
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, thread_rip_vaddr);
DI2_Key dbgi_key = ctrl_dbgi_key_from_module(module);
DI_Key dbgi_key = ctrl_dbgi_key_from_module(module);
U64 thread_rip_voff = ctrl_voff_from_vaddr(module, thread_rip_vaddr);
// rjf: thread info => color
@@ -1642,7 +1642,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
D_Line *line = 0;
for(D_LineNode *n = lines->first; n != 0; n = n->next)
{
if(di2_key_match(n->v.dbgi_key, dbgi_key))
if(di_key_match(n->v.dbgi_key, dbgi_key))
{
line = &n->v;
break;
@@ -2796,7 +2796,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
for(D_LineNode *n = lines->first; n != 0; n = n->next)
{
if((n->v.pt.line == line_num || params->line_vaddrs[line_idx] != 0) &&
((di2_key_match(n->v.dbgi_key, hover_regs->dbgi_key) &&
((di_key_match(n->v.dbgi_key, hover_regs->dbgi_key) &&
n->v.voff_range.min <= hover_voff_range.min && hover_voff_range.min < n->v.voff_range.max) ||
(params->line_vaddrs[line_idx] == hover_regs->vaddr_range.min && hover_regs->vaddr_range.min != 0)))
{
+1 -1
View File
@@ -104,7 +104,7 @@ struct RD_CodeSliceParams
RD_CfgList *line_pins;
U64 *line_vaddrs;
D_LineList *line_infos;
DI2_KeyList relevant_dbgi_keys;
DI_KeyList relevant_dbgi_keys;
TXT_TextInfo *text_info;
String8 text_data;