mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-18 18:12:23 -07:00
include jmc line number hacks in line step-over and step-into trap-net
This commit is contained in:
@@ -2796,6 +2796,19 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread)
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: opl line_vaddr_rng -> 0xf00f00 or 0xfeefee? => include in line vaddr range
|
||||
//
|
||||
// MSVC exports line info at these line numbers when /JMC (Just My Code) debugging
|
||||
// is enabled. This is enabled by default normally.
|
||||
{
|
||||
U64 opl_line_voff_rng = df_voff_from_vaddr(module, line_vaddr_rng.max);
|
||||
DF_TextLineDasm2SrcInfo line_info = df_text_line_dasm2src_info_from_binary_voff(binary, opl_line_voff_rng);
|
||||
if(line_info.pt.line == 0xf00f00 || line_info.pt.line == 0xfeefee)
|
||||
{
|
||||
line_vaddr_rng.max = df_vaddr_from_voff(module, line_info.voff_range.max);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: line vaddr range => did we find anything successfully?
|
||||
B32 good_line_info = (line_vaddr_rng.max != 0);
|
||||
|
||||
@@ -2908,6 +2921,19 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread)
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: opl line_vaddr_rng -> 0xf00f00 or 0xfeefee? => include in line vaddr range
|
||||
//
|
||||
// MSVC exports line info at these line numbers when /JMC (Just My Code) debugging
|
||||
// is enabled. This is enabled by default normally.
|
||||
{
|
||||
U64 opl_line_voff_rng = df_voff_from_vaddr(module, line_vaddr_rng.max);
|
||||
DF_TextLineDasm2SrcInfo line_info = df_text_line_dasm2src_info_from_binary_voff(binary, opl_line_voff_rng);
|
||||
if(line_info.pt.line == 0xf00f00 || line_info.pt.line == 0xfeefee)
|
||||
{
|
||||
line_vaddr_rng.max = df_vaddr_from_voff(module, line_info.voff_range.max);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: line vaddr range => did we find anything successfully?
|
||||
B32 good_line_info = (line_vaddr_rng.max != 0);
|
||||
|
||||
|
||||
+2
-1
@@ -9649,7 +9649,8 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
if(text_container_sig.hovering && contains_1s64(params->line_num_range, mouse_pt.line))
|
||||
{
|
||||
U64 line_slice_idx = mouse_pt.line-params->line_num_range.min;
|
||||
if(params->line_src2dasm[line_slice_idx].first != 0)
|
||||
if(params->line_src2dasm[line_slice_idx].first != 0 &&
|
||||
params->line_src2dasm[line_slice_idx].first->v.remap_line == mouse_pt.line)
|
||||
{
|
||||
df_set_hovered_line_info(params->line_src2dasm[line_slice_idx].first->v.binary, params->line_src2dasm[line_slice_idx].first->v.voff_range.min);
|
||||
}
|
||||
|
||||
@@ -4907,7 +4907,7 @@ DF_VIEW_UI_FUNCTION_DEF(Code)
|
||||
U64 rip_voff = df_voff_from_vaddr(module, last_inst_on_unwound_rip_vaddr);
|
||||
DF_Entity *binary = df_binary_file_from_module(module);
|
||||
DF_TextLineDasm2SrcInfo dasm2src_info = df_text_line_dasm2src_info_from_binary_voff(binary, rip_voff);
|
||||
if(dasm2src_info.file == entity && visible_line_num_range.min <= dasm2src_info.pt.line && dasm2src_info.pt.line < visible_line_num_range.max)
|
||||
if(dasm2src_info.file == entity && visible_line_num_range.min <= dasm2src_info.pt.line && dasm2src_info.pt.line <= visible_line_num_range.max)
|
||||
{
|
||||
U64 slice_line_idx = dasm2src_info.pt.line-visible_line_num_range.min;
|
||||
df_entity_list_push(scratch.arena, &code_slice_params.line_ips[slice_line_idx], thread);
|
||||
@@ -4921,7 +4921,7 @@ DF_VIEW_UI_FUNCTION_DEF(Code)
|
||||
for(DF_Entity *wp = entity->first; !df_entity_is_nil(wp); wp = wp->next)
|
||||
{
|
||||
if(wp->deleted || wp->kind != DF_EntityKind_WatchPin) { continue; }
|
||||
if(visible_line_num_range.min <= wp->text_point.line && wp->text_point.line < visible_line_num_range.max)
|
||||
if(visible_line_num_range.min <= wp->text_point.line && wp->text_point.line <= visible_line_num_range.max)
|
||||
{
|
||||
U64 slice_line_idx = (wp->text_point.line-visible_line_num_range.min);
|
||||
df_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], wp);
|
||||
|
||||
Reference in New Issue
Block a user