mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
restrict cursor line info committing by selected module
This commit is contained in:
@@ -1141,6 +1141,18 @@ d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal D_LineList
|
||||||
|
d_lines_from_dbgi_key_file_path_line_num(Arena *arena, DI_Key dbgi_key, String8 file_path, S64 line_num)
|
||||||
|
{
|
||||||
|
D_LineListArray array = d_lines_array_from_dbgi_key_file_path_line_range(arena, dbgi_key, file_path, r1s64(line_num, line_num+1));
|
||||||
|
D_LineList list = {0};
|
||||||
|
if(array.count != 0)
|
||||||
|
{
|
||||||
|
list = array.v[0];
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
internal D_LineList
|
internal D_LineList
|
||||||
d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num)
|
d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -447,6 +447,7 @@ internal D_LineList d_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U
|
|||||||
// TODO(rjf): need to clean this up & dedup
|
// TODO(rjf): need to clean this up & dedup
|
||||||
internal D_LineListArray d_lines_array_from_dbgi_key_file_path_line_range(Arena *arena, DI_Key dbgi_key, String8 file_path, Rng1S64 line_num_range);
|
internal D_LineListArray d_lines_array_from_dbgi_key_file_path_line_range(Arena *arena, DI_Key dbgi_key, String8 file_path, Rng1S64 line_num_range);
|
||||||
internal D_LineListArray d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range);
|
internal D_LineListArray d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range);
|
||||||
|
internal D_LineList d_lines_from_dbgi_key_file_path_line_num(Arena *arena, DI_Key dbgi_key, String8 file_path, S64 line_num);
|
||||||
internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num);
|
internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
@@ -5925,7 +5925,9 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(text)
|
|||||||
//
|
//
|
||||||
if(path.size != 0)
|
if(path.size != 0)
|
||||||
{
|
{
|
||||||
rd_regs()->lines = d_lines_from_file_path_line_num(rd_frame_arena(), path, rd_regs()->cursor.line);
|
CTRL_Entity *module = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->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, path, rd_regs()->cursor.line);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user