store loaded debug infos as user config, but project-tagged; eliminate 'recent files' from project file (they are almost entirely duplicative of debug info source files); adjust 'last_user' remembering semantics - do not automatically change last_user when setting user explicitly from command line

This commit is contained in:
Ryan Fleury
2026-05-13 10:18:06 -07:00
parent 1774a76cdb
commit 2231228ffb
7 changed files with 72 additions and 87 deletions
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -157,7 +157,6 @@ RD_CmdKind_SetCurrentPath,
RD_CmdKind_Open, RD_CmdKind_Open,
RD_CmdKind_Switch, RD_CmdKind_Switch,
RD_CmdKind_SwitchToPartnerFile, RD_CmdKind_SwitchToPartnerFile,
RD_CmdKind_RecordFileInProject,
RD_CmdKind_ShowFileInExplorer, RD_CmdKind_ShowFileInExplorer,
RD_CmdKind_GoToDisassembly, RD_CmdKind_GoToDisassembly,
RD_CmdKind_GoToSource, RD_CmdKind_GoToSource,
@@ -603,8 +602,8 @@ Z(getting_started)\
C_LINKAGE_BEGIN C_LINKAGE_BEGIN
extern String8 rd_tab_fast_path_view_name_table[25]; extern String8 rd_tab_fast_path_view_name_table[25];
extern String8 rd_tab_fast_path_query_name_table[25]; extern String8 rd_tab_fast_path_query_name_table[25];
extern RD_VocabInfo rd_vocab_info_table[360]; extern RD_VocabInfo rd_vocab_info_table[358];
extern RD_NameSchemaInfo rd_name_schema_info_table[40]; extern RD_NameSchemaInfo rd_name_schema_info_table[39];
extern String8 rd_reg_slot_code_name_table[49]; extern String8 rd_reg_slot_code_name_table[49];
extern Rng1U64 rd_reg_slot_range_table[49]; extern Rng1U64 rd_reg_slot_range_table[49];
extern String8 rd_binding_version_remap_old_name_table[8]; extern String8 rd_binding_version_remap_old_name_table[8];
+1 -9
View File
@@ -119,7 +119,6 @@ RD_VocabTable:
{panel _ "Panel" _ Null } {panel _ "Panel" _ Null }
{tab _ "Tab" _ Null } {tab _ "Tab" _ Null }
{recent_project _ "Recent Project" _ Briefcase } {recent_project _ "Recent Project" _ Briefcase }
{recent_file _ "Recent File" _ FileOutline }
{src _ "Source" _ Null } {src _ "Source" _ Null }
{dst _ "Destination" _ Null } {dst _ "Destination" _ Null }
{source _ "Source" _ Null } {source _ "Source" _ Null }
@@ -783,12 +782,6 @@ RD_VocabTable:
```x:{'path':path}```, ```x:{'path':path}```,
} }
//- rjf: @schema recent_file
{
recent_file, 0,
```x:{'path':path}```,
}
//- rjf: @schema machine //- rjf: @schema machine
{ {
machine, 0, machine, 0,
@@ -1029,9 +1022,8 @@ RD_CmdTable: // | | | |
//- rjf: files //- rjf: files
{SetCurrentPath 0 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "set_current_path" "Set Current Path" "Sets the debugger's current path, which is used as a starting point when browsing for files." "" "" } {SetCurrentPath 0 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "set_current_path" "Set Current Path" "Sets the debugger's current path, which is used as a starting point when browsing for files." "" "" }
{Open 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "open" "Open" "Opens a file." "code,source,file" "" } {Open 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "open" "Open" "Opens a file." "code,source,file" "" }
{Switch 1 0 0 0 "query:recent_files, query:source_files" Cfg null RecentFile Null 0 0 0 0 0 1 1 FileOutline "switch" "Switch" "Switches to a recent file." "code,source,file" "" } {Switch 1 0 0 0 "query:source_files" Cfg null RecentFile Null 0 0 0 0 0 1 1 FileOutline "switch" "Switch" "Switches to a recent file." "code,source,file" "" }
{SwitchToPartnerFile 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "switch_to_partner_file" "Switch To Partner File" "Switches to the focused file's partner; or from header to implementation or vice versa." "code,source,file" "" } {SwitchToPartnerFile 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "switch_to_partner_file" "Switch To Partner File" "Switches to the focused file's partner; or from header to implementation or vice versa." "code,source,file" "" }
{RecordFileInProject 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "record_file_in_project" "Record File In Project" "Records the passed file path as a recent file in the currently loaded project." "" "" }
{ShowFileInExplorer 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FolderClosedFilled "show_file_in_explorer" "Show File In Explorer" "Opens the operating system's file explorer and shows the selected file." "" "$file," } {ShowFileInExplorer 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FolderClosedFilled "show_file_in_explorer" "Show File In Explorer" "Opens the operating system's file explorer and shows the selected file." "" "$file," }
//- rjf: source <-> disasm //- rjf: source <-> disasm
+42 -59
View File
@@ -152,7 +152,7 @@ internal B32
rd_cfg_is_project_filtered(CFG_Node *cfg) rd_cfg_is_project_filtered(CFG_Node *cfg)
{ {
CFG_Node *project = cfg_node_child_from_string(cfg, str8_lit("project")); CFG_Node *project = cfg_node_child_from_string(cfg, str8_lit("project"));
B32 result = (project != &cfg_nil_node && !path_match_normalized(rd_state->project_path, project->first->string)); B32 result = (project != &cfg_nil_node && project->first->string.size != 0 && !path_match_normalized(rd_state->project_path, project->first->string));
return result; return result;
} }
@@ -2412,11 +2412,7 @@ rd_view_ui(Rng2F32 rect)
case RD_EvalSpaceKind_MetaCfg: case RD_EvalSpaceKind_MetaCfg:
{ {
CFG_Node *cfg = rd_cfg_from_eval_space(eval.space); CFG_Node *cfg = rd_cfg_from_eval_space(eval.space);
if(str8_match(cfg->string, str8_lit("recent_file"), 0)) if(str8_match(cfg->string, str8_lit("recent_project"), 0))
{
rd_cmd(RD_CmdKind_Switch, .cfg = cfg->id);
}
else if(str8_match(cfg->string, str8_lit("recent_project"), 0))
{ {
rd_cmd(RD_CmdKind_OpenRecentProject, .cfg = cfg->id); rd_cmd(RD_CmdKind_OpenRecentProject, .cfg = cfg->id);
} }
@@ -10346,7 +10342,7 @@ rd_init(CmdLine *cmdln)
} }
// rjf: do initial load of user (project will be loaded by the initial user load if not specified) // rjf: do initial load of user (project will be loaded by the initial user load if not specified)
rd_cmd(RD_CmdKind_OpenUser, .file_path = user_path); rd_cmd(RD_CmdKind_OpenUser, .file_path = user_path, .non_graphical = 1);
if(project_path.size != 0) if(project_path.size != 0)
{ {
rd_cmd(RD_CmdKind_OpenProject, .file_path = project_path); rd_cmd(RD_CmdKind_OpenProject, .file_path = project_path);
@@ -10557,6 +10553,12 @@ rd_frame(void)
CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info")); CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info"));
for EachNode(n, CFG_NodePtrNode, dbg_infos.first) for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{ {
// rjf: skip debug infos for other projects
if(rd_cfg_is_project_filtered(n->v))
{
continue;
}
// rjf: unpack debug info config // rjf: unpack debug info config
CFG_Node *di = n->v; CFG_Node *di = n->v;
String8 path = rd_path_from_cfg(di); String8 path = rd_path_from_cfg(di);
@@ -11103,6 +11105,7 @@ rd_frame(void)
for EachNode(n, CFG_NodePtrNode, dbg_infos.first) for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{ {
CFG_Node *di = n->v; CFG_Node *di = n->v;
if(rd_cfg_is_project_filtered(di)) { continue; }
String8 path = rd_path_from_cfg(di); String8 path = rd_path_from_cfg(di);
CFG_Node *timestamp_node = cfg_node_child_from_string(di, str8_lit("timestamp")); CFG_Node *timestamp_node = cfg_node_child_from_string(di, str8_lit("timestamp"));
U64 timestamp = 0; U64 timestamp = 0;
@@ -11385,7 +11388,6 @@ rd_frame(void)
str8_lit("file_path_map"), str8_lit("file_path_map"),
str8_lit("type_view"), str8_lit("type_view"),
str8_lit("recent_project"), str8_lit("recent_project"),
str8_lit("recent_file"),
}; };
for EachElement(cfg_name_idx, evallable_cfg_names) for EachElement(cfg_name_idx, evallable_cfg_names)
{ {
@@ -11491,6 +11493,10 @@ rd_frame(void)
CFG_Node *watch_tab = n->v; CFG_Node *watch_tab = n->v;
for(CFG_Node *child = watch_tab->first; child != &cfg_nil_node; child = child->next) for(CFG_Node *child = watch_tab->first; child != &cfg_nil_node; child = child->next)
{ {
if(rd_cfg_is_project_filtered(child))
{
continue;
}
if(str8_match(child->string, str8_lit("watch"), 0)) if(str8_match(child->string, str8_lit("watch"), 0))
{ {
CFG_Node *watch = child; CFG_Node *watch = child;
@@ -12248,7 +12254,6 @@ rd_frame(void)
} }
str8_list_pushf(scratch.arena, &exprs, "query:targets"); str8_list_pushf(scratch.arena, &exprs, "query:targets");
str8_list_pushf(scratch.arena, &exprs, "query:breakpoints"); str8_list_pushf(scratch.arena, &exprs, "query:breakpoints");
str8_list_pushf(scratch.arena, &exprs, "query:recent_files");
str8_list_pushf(scratch.arena, &exprs, "query:recent_projects"); str8_list_pushf(scratch.arena, &exprs, "query:recent_projects");
str8_list_pushf(scratch.arena, &exprs, "query:machines"); str8_list_pushf(scratch.arena, &exprs, "query:machines");
str8_list_pushf(scratch.arena, &exprs, "query:processes"); str8_list_pushf(scratch.arena, &exprs, "query:processes");
@@ -12630,7 +12635,7 @@ rd_frame(void)
} }
//- rjf: record last-opened user in config directory //- rjf: record last-opened user in config directory
if(file_is_okay && kind == RD_CmdKind_OpenUser) if(file_is_okay && kind == RD_CmdKind_OpenUser && !rd_regs()->non_graphical)
{ {
rd_cmd(RD_CmdKind_RecordUserAsLastOpened); rd_cmd(RD_CmdKind_RecordUserAsLastOpened);
} }
@@ -12652,15 +12657,17 @@ rd_frame(void)
{ {
if(rd_cfg_is_project_filtered(panel->selected_tab)) if(rd_cfg_is_project_filtered(panel->selected_tab))
{ {
CFG_Node *fallback_tab = &cfg_nil_node;
for(CFG_NodePtrNode *tab_n = panel->tabs.first; tab_n != 0; tab_n = tab_n->next) for(CFG_NodePtrNode *tab_n = panel->tabs.first; tab_n != 0; tab_n = tab_n->next)
{ {
CFG_Node *tab = tab_n->v; CFG_Node *tab = tab_n->v;
if(!rd_cfg_is_project_filtered(tab)) if(!rd_cfg_is_project_filtered(tab))
{ {
rd_cmd(RD_CmdKind_FocusTab, .tab = tab->id); fallback_tab = tab;
break; break;
} }
} }
rd_cmd(RD_CmdKind_FocusTab, .tab = fallback_tab->id);
} }
} }
} }
@@ -12712,6 +12719,7 @@ rd_frame(void)
} }
}break; }break;
case RD_CmdKind_RecordProjectInUser: case RD_CmdKind_RecordProjectInUser:
if(rd_regs()->file_path.size != 0)
{ {
String8 file_path = rd_regs()->file_path; String8 file_path = rd_regs()->file_path;
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user")); CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
@@ -13601,7 +13609,6 @@ rd_frame(void)
FileProperties props = properties_from_file_path(path); FileProperties props = properties_from_file_path(path);
if(props.created != 0) if(props.created != 0)
{ {
rd_cmd(RD_CmdKind_RecordFileInProject);
rd_cmd(RD_CmdKind_BuildTab, .string = str8_lit("pending"), .expr = rd_eval_string_from_file_path(scratch.arena, path)); rd_cmd(RD_CmdKind_BuildTab, .string = str8_lit("pending"), .expr = rd_eval_string_from_file_path(scratch.arena, path));
} }
else else
@@ -13611,17 +13618,7 @@ rd_frame(void)
}break; }break;
case RD_CmdKind_Switch: case RD_CmdKind_Switch:
{ {
String8 path = {0}; String8 path = rd_regs()->file_path;
if(path.size == 0)
{
CFG_Node *recent_file = cfg_node_from_id(rd_regs()->cfg);
CFG_Node *path_root = cfg_node_child_from_string(recent_file, str8_lit("path"));
path = path_root->first->string;
}
if(path.size == 0)
{
path = rd_regs()->file_path;
}
rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = path, .cursor = txt_pt(0, 0), .vaddr = 0, .force_focus = 1, .prefer_new_tab = 1); rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = path, .cursor = txt_pt(0, 0), .vaddr = 0, .force_focus = 1, .prefer_new_tab = 1);
}break; }break;
case RD_CmdKind_SwitchToPartnerFile: case RD_CmdKind_SwitchToPartnerFile:
@@ -13655,35 +13652,6 @@ rd_frame(void)
} }
} }
}break; }break;
case RD_CmdKind_RecordFileInProject:
if(rd_regs()->file_path.size != 0)
{
String8 path = rd_regs()->file_path;
CFG_Node *project = cfg_node_child_from_string(cfg_node_root(), str8_lit("project"));
CFG_NodePtrList recent_files = cfg_node_child_list_from_string(scratch.arena, project, str8_lit("recent_file"));
CFG_Node *recent_file = &cfg_nil_node;
for(CFG_NodePtrNode *n = recent_files.first; n != 0; n = n->next)
{
if(path_match_normalized(rd_path_from_cfg(n->v), path))
{
recent_file = n->v;
break;
}
}
if(recent_file == &cfg_nil_node)
{
recent_file = cfg_node_new(rd_state->cfg, project, str8_lit("recent_file"));
CFG_Node *path_root = cfg_node_new(rd_state->cfg, recent_file, str8_lit("path"));
cfg_node_new(rd_state->cfg, path_root, path);
}
cfg_node_unhook(rd_state->cfg, project, recent_file);
cfg_node_insert_child(rd_state->cfg, project, &cfg_nil_node, recent_file);
recent_files = cfg_node_child_list_from_string(scratch.arena, project, str8_lit("recent_file"));
if(recent_files.count > 256)
{
cfg_node_release(rd_state->cfg, recent_files.last->v);
}
}break;
case RD_CmdKind_ShowFileInExplorer: case RD_CmdKind_ShowFileInExplorer:
if(rd_regs()->file_path.size != 0) if(rd_regs()->file_path.size != 0)
{ {
@@ -14728,6 +14696,7 @@ rd_frame(void)
cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("cursor_column")), str8_lit("1")); cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("cursor_column")), str8_lit("1"));
cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("mark_line")), str8_lit("1")); cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("mark_line")), str8_lit("1"));
cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("mark_column")), str8_lit("1")); cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("mark_column")), str8_lit("1"));
cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("project")), rd_state->project_path);
} }
else if(dst_panel != &cfg_nil_panel_node && dst_tab == &cfg_nil_node) else if(dst_panel != &cfg_nil_panel_node && dst_tab == &cfg_nil_node)
{ {
@@ -14739,6 +14708,7 @@ rd_frame(void)
CFG_Node *auto_root = cfg_node_new(rd_state->cfg, dst_tab, str8_lit("auto")); CFG_Node *auto_root = cfg_node_new(rd_state->cfg, dst_tab, str8_lit("auto"));
cfg_node_new(rd_state->cfg, auto_root, str8_lit("1")); cfg_node_new(rd_state->cfg, auto_root, str8_lit("1"));
} }
cfg_node_new_replace(rd_state->cfg, cfg_node_child_from_string_or_alloc(rd_state->cfg, dst_tab, str8_lit("project")), rd_state->project_path);
} }
// rjf: determine if we need a contain or center // rjf: determine if we need a contain or center
@@ -14765,9 +14735,6 @@ rd_frame(void)
} }
rd_cmd(cursor_snap_kind); rd_cmd(cursor_snap_kind);
} }
// rjf: record
rd_cmd(RD_CmdKind_RecordFileInProject, .file_path = file_path);
} }
// rjf: snap to disasm // rjf: snap to disasm
@@ -15242,10 +15209,12 @@ rd_frame(void)
//- rjf: debug infos //- rjf: debug infos
case RD_CmdKind_LoadDebugInfo: case RD_CmdKind_LoadDebugInfo:
{ {
CFG_Node *project = cfg_node_child_from_string(cfg_node_root(), str8_lit("project")); CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
CFG_Node *di = cfg_node_new(rd_state->cfg, project, str8_lit("debug_info")); CFG_Node *di = cfg_node_new(rd_state->cfg, user, str8_lit("debug_info"));
CFG_Node *path = cfg_node_new(rd_state->cfg, di, str8_lit("path")); CFG_Node *path = cfg_node_new(rd_state->cfg, di, str8_lit("path"));
cfg_node_new(rd_state->cfg, path, rd_regs()->file_path); cfg_node_new(rd_state->cfg, path, rd_regs()->file_path);
CFG_Node *project = cfg_node_new(rd_state->cfg, di, str8_lit("project"));
cfg_node_new(rd_state->cfg, project, rd_state->project_path);
}break; }break;
case RD_CmdKind_UnloadDebugInfo: case RD_CmdKind_UnloadDebugInfo:
{ {
@@ -15411,6 +15380,10 @@ rd_frame(void)
CFG_Node *existing_watch = &cfg_nil_node; CFG_Node *existing_watch = &cfg_nil_node;
for(CFG_Node *child = watch_tab->first; child != &cfg_nil_node; child = child->next) for(CFG_Node *child = watch_tab->first; child != &cfg_nil_node; child = child->next)
{ {
if(rd_cfg_is_project_filtered(child))
{
continue;
}
if(str8_match(child->string, str8_lit("watch"), 0) && str8_match(child->first->string, rd_regs()->string, 0)) if(str8_match(child->string, str8_lit("watch"), 0) && str8_match(child->first->string, rd_regs()->string, 0))
{ {
existing_watch = child; existing_watch = child;
@@ -16358,6 +16331,10 @@ rd_frame(void)
CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info")); CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info"));
for EachNode(n, CFG_NodePtrNode, dbg_infos.first) for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{ {
if(rd_cfg_is_project_filtered(n->v))
{
continue;
}
cfg_node_release(rd_state->cfg, n->v); cfg_node_release(rd_state->cfg, n->v);
} }
} }
@@ -16375,6 +16352,10 @@ rd_frame(void)
for EachNode(n, CFG_NodePtrNode, dbg_infos.first) for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{ {
CFG_Node *di = n->v; CFG_Node *di = n->v;
if(rd_cfg_is_project_filtered(di))
{
continue;
}
String8 path = rd_path_from_cfg(di); String8 path = rd_path_from_cfg(di);
if(str8_match(path, new_path, 0)) if(str8_match(path, new_path, 0))
{ {
@@ -16385,12 +16366,14 @@ rd_frame(void)
} }
if(!path_found) if(!path_found)
{ {
CFG_Node *project = cfg_node_child_from_string(cfg_node_root(), str8_lit("project")); CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
CFG_Node *di = cfg_node_new(rd_state->cfg, project, str8_lit("debug_info")); CFG_Node *di = cfg_node_new(rd_state->cfg, user, str8_lit("debug_info"));
CFG_Node *path_root = cfg_node_new(rd_state->cfg, di, str8_lit("path")); CFG_Node *path_root = cfg_node_new(rd_state->cfg, di, str8_lit("path"));
CFG_Node *timestamp_root = cfg_node_new(rd_state->cfg, di, str8_lit("timestamp")); CFG_Node *timestamp_root = cfg_node_new(rd_state->cfg, di, str8_lit("timestamp"));
CFG_Node *project_root = cfg_node_new(rd_state->cfg, di, str8_lit("project"));
cfg_node_new(rd_state->cfg, path_root, new_path); cfg_node_new(rd_state->cfg, path_root, new_path);
cfg_node_newf(rd_state->cfg, timestamp_root, "%I64u", debug_info_path->timestamp); cfg_node_newf(rd_state->cfg, timestamp_root, "%I64u", debug_info_path->timestamp);
cfg_node_new(rd_state->cfg, project_root, rd_state->project_path);
} }
else else
{ {
+20 -4
View File
@@ -760,7 +760,18 @@ E_TYPE_IREXT_FUNCTION_DEF(cfgs_slice)
String8 cfg_name = rd_singular_from_code_name_plural(type->name); String8 cfg_name = rd_singular_from_code_name_plural(type->name);
//- rjf: gather cfgs //- rjf: gather cfgs
CFG_NodePtrList cfgs_list = cfg_node_top_level_list_from_string(scratch.arena, cfg_name); CFG_NodePtrList cfgs_list = {0};
{
CFG_NodePtrList cfgs_list__all = cfg_node_top_level_list_from_string(scratch.arena, cfg_name);
for EachNode(n, CFG_NodePtrNode, cfgs_list__all.first)
{
if(rd_cfg_is_project_filtered(n->v))
{
continue;
}
cfg_node_ptr_list_push(scratch.arena, &cfgs_list, n->v);
}
}
//- rjf: gather commands //- rjf: gather commands
String8List cmds_list = {0}; String8List cmds_list = {0};
@@ -851,6 +862,10 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(cfgs_slice)
for EachIndex(idx, ext->cfgs.count) for EachIndex(idx, ext->cfgs.count)
{ {
CFG_Node *cfg = ext->cfgs.v[idx]; CFG_Node *cfg = ext->cfgs.v[idx];
if(rd_cfg_is_project_filtered(cfg))
{
continue;
}
DR_FStrList fstrs = rd_title_fstrs_from_cfg(scratch.arena, cfg, 1); DR_FStrList fstrs = rd_title_fstrs_from_cfg(scratch.arena, cfg, 1);
String8 string = dr_string_from_fstrs(scratch.arena, &fstrs); String8 string = dr_string_from_fstrs(scratch.arena, &fstrs);
FuzzyMatchRangeList fuzzy_matches = fuzzy_match_find(scratch.arena, filter, string); FuzzyMatchRangeList fuzzy_matches = fuzzy_match_find(scratch.arena, filter, string);
@@ -1198,15 +1213,16 @@ E_TYPE_IREXT_FUNCTION_DEF(watches)
E_Interpretation interpret = e_interpret(bytecode); E_Interpretation interpret = e_interpret(bytecode);
E_Space space = interpret.space; E_Space space = interpret.space;
CFG_Node *target = rd_cfg_from_eval_space(space); CFG_Node *target = rd_cfg_from_eval_space(space);
CFG_NodePtrList env_strings = {0}; CFG_NodePtrList cfgs = {0};
for(CFG_Node *child = target->first; child != &cfg_nil_node; child = child->next) for(CFG_Node *child = target->first; child != &cfg_nil_node; child = child->next)
{ {
if(rd_cfg_is_project_filtered(child)) {continue;}
if(str8_match(child->string, str8_lit("watch"), 0)) if(str8_match(child->string, str8_lit("watch"), 0))
{ {
cfg_node_ptr_list_push(scratch.arena, &env_strings, child); cfg_node_ptr_list_push(scratch.arena, &cfgs, child);
} }
} }
accel->cfgs = cfg_node_ptr_array_from_list(arena, &env_strings); accel->cfgs = cfg_node_ptr_array_from_list(arena, &cfgs);
scratch_end(scratch); scratch_end(scratch);
} }
E_IRExt result = {accel}; E_IRExt result = {accel};
+1 -2
View File
@@ -43,8 +43,7 @@ rd_cfg_tree_list_from_string__pre_0_9_16(Arena *arena, String8 file_path, String
} }
//- rjf: recent files / projects //- rjf: recent files / projects
if(str8_match(tln->string, str8_lit("recent_file"), 0) || if(str8_match(tln->string, str8_lit("recent_project"), 0))
str8_match(tln->string, str8_lit("recent_project"), 0))
{ {
CFG_Node *dst_root = cfg_node_new(rd_state->cfg, &cfg_nil_node, tln->string); CFG_Node *dst_root = cfg_node_new(rd_state->cfg, &cfg_nil_node, tln->string);
cfg_node_ptr_list_push(arena, &result, dst_root); cfg_node_ptr_list_push(arena, &result, dst_root);
+2 -2
View File
@@ -2,7 +2,7 @@
// Licensed under the MIT license (https://opensource.org/license/mit/) // Licensed under the MIT license (https://opensource.org/license/mit/)
//////////////////////////////// ////////////////////////////////
//~ rjf: post-0.9.25 TODO notes //~ rjf: post-0.9.26 TODO notes
// //
// [ ] "autos" collection, which can be evaluated // [ ] "autos" collection, which can be evaluated
// [ ] show "autos" inline in source code near thread? // [ ] show "autos" inline in source code near thread?
@@ -18,7 +18,6 @@
// //
// [ ] linux/dwarf fixes // [ ] linux/dwarf fixes
// [ ] excessive CPU usage on async threads - barrier impl? // [ ] excessive CPU usage on async threads - barrier impl?
// [ ] step-over/step-into doesn't step successfully in many cases, just causes a continue
// [ ] type views for `MyByte *` example do not match correctly // [ ] type views for `MyByte *` example do not match correctly
// //
// [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception! // [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception!
@@ -270,6 +269,7 @@
// [x] new project / user should not require picking a path; should just // [x] new project / user should not require picking a path; should just
// by default go to "untitled" in default user path // by default go to "untitled" in default user path
// [x] memory view mutation controls // [x] memory view mutation controls
// [x] step-over/step-into doesn't step successfully in many cases, just causes a continue
//////////////////////////////// ////////////////////////////////
//~ rjf: Build Options //~ rjf: Build Options