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 committed 2026-05-13 10:18:06 -07:00
1 parent 1774a76cdb
commit 2231228ffb
7 files changed
+72 -87

No files matched your search

+4 -8
View File
@@ -62,7 +62,7 @@ str8_lit_comp(""),
str8_lit_comp(""),
};
RD_VocabInfo rd_vocab_info_table[360] =
RD_VocabInfo rd_vocab_info_table[358] =
{
{str8_lit_comp("type_view"), str8_lit_comp("type_views"), str8_lit_comp("Type View"), str8_lit_comp("Type Views"), RD_IconKind_Binoculars},
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
@@ -94,7 +94,6 @@ RD_VocabInfo rd_vocab_info_table[360] =
{str8_lit_comp("panel"), str8_lit_comp("panels"), str8_lit_comp("Panel"), str8_lit_comp("Panels"), RD_IconKind_Null},
{str8_lit_comp("tab"), str8_lit_comp("tabs"), str8_lit_comp("Tab"), str8_lit_comp("Tabs"), RD_IconKind_Null},
{str8_lit_comp("recent_project"), str8_lit_comp("recent_projects"), str8_lit_comp("Recent Project"), str8_lit_comp("Recent Projects"), RD_IconKind_Briefcase},
{str8_lit_comp("recent_file"), str8_lit_comp("recent_files"), str8_lit_comp("Recent File"), str8_lit_comp("Recent Files"), RD_IconKind_FileOutline},
{str8_lit_comp("src"), str8_lit_comp("srcs"), str8_lit_comp("Source"), str8_lit_comp("Sources"), RD_IconKind_Null},
{str8_lit_comp("dst"), str8_lit_comp("dsts"), str8_lit_comp("Destination"), str8_lit_comp("Destinations"), RD_IconKind_Null},
{str8_lit_comp("source"), str8_lit_comp("sources"), str8_lit_comp("Source"), str8_lit_comp("Sources"), RD_IconKind_Null},
@@ -270,7 +269,6 @@ RD_VocabInfo rd_vocab_info_table[360] =
{str8_lit_comp("open"), str8_lit_comp(""), str8_lit_comp("Open"), str8_lit_comp(""), RD_IconKind_FileOutline},
{str8_lit_comp("switch"), str8_lit_comp(""), str8_lit_comp("Switch"), str8_lit_comp(""), RD_IconKind_FileOutline},
{str8_lit_comp("switch_to_partner_file"), str8_lit_comp(""), str8_lit_comp("Switch To Partner File"), str8_lit_comp(""), RD_IconKind_FileOutline},
{str8_lit_comp("record_file_in_project"), str8_lit_comp(""), str8_lit_comp("Record File In Project"), str8_lit_comp(""), RD_IconKind_FileOutline},
{str8_lit_comp("show_file_in_explorer"), str8_lit_comp(""), str8_lit_comp("Show File In Explorer"), str8_lit_comp(""), RD_IconKind_FolderClosedFilled},
{str8_lit_comp("go_to_disassembly"), str8_lit_comp(""), str8_lit_comp("Go To Disassembly"), str8_lit_comp(""), RD_IconKind_Glasses},
{str8_lit_comp("go_to_source"), str8_lit_comp(""), str8_lit_comp("Go To Source"), str8_lit_comp(""), RD_IconKind_FileOutline},
@@ -426,7 +424,7 @@ RD_VocabInfo rd_vocab_info_table[360] =
{str8_lit_comp("geo3d"), str8_lit_comp(""), str8_lit_comp("Geometry (3D)"), str8_lit_comp(""), RD_IconKind_Cube},
};
RD_NameSchemaInfo rd_name_schema_info_table[40] =
RD_NameSchemaInfo rd_name_schema_info_table[39] =
{
{str8_lit_comp("user"), 0, str8_lit_comp("@expand_commands(edit_user_theme) x:\n{\n //- rjf: animations\n @display_name('Animations') @description(\"Enables animations.\")\n @default(1) 'animations': bool,\n @display_name('Scrolling Animations') @description(\"Enables scrolling animations.\")\n @expand_if(\"$.animations\") @default(1) 'scrolling_animations': bool,\n @display_name('Tooltip Animations') @description(\"Enables tooltip animations.\")\n @expand_if(\"$.animations\") @default(1) 'tooltip_animations': bool,\n @display_name('Menu Animations') @description(\"Enables menu animations.\")\n @expand_if(\"$.animations\") @default(1) 'menu_animations': bool,\n\n //- rjf: fonts\n @display_name('UI Font') @description(\"The name of, or path to, the font used when displaying non-code UI elements.\")\n @default('') 'main_font': string,\n @display_name('Code Font') @description(\"The name of, or path to, the font used when displaying code.\")\n @default('') 'code_font': string,\n\n //- rjf: theme\n @default(\"Default (Dark)\") @display_name('User Theme')\n @description(\"The user's theme, which describes all colors used throughout the UI.\")\n 'theme': string,\n @no_expand @display_name('User Theme')\n 'theme_colors': set,\n\n //- rjf: autocompletion\n @display_name('Autocompletion Lister') @description(\"Enables the autocompletion lister while typing expressions.\") @default(1)\n 'autocompletion_lister': bool,\n @display_name('View Call Argument Helper') @description(\"Enables the view call argument helper, which shows view arguments and documentation, while typing expressions.\") @default(1)\n 'view_call_argument_helper': bool,\n\n //- rjf: scope decorations\n @default(1) @display_name('Cursor Scope Lines') @description(\"Controls whether or not scopes containing the cursor in text views are drawn.\")\n 'cursor_scope_lines': bool,\n @default(1) @display_name('Cursor Scope End Annotations') @description(\"Controls whether or not ending annotations for scopes containing the cursor are drawn.\")\n 'cursor_scope_end_annotations': bool,\n\n //- rjf: cursor decorations\n @default(1) @display_name('Cursor Trail') @description(\"Controls whether or not a movement trail of the cursor is drawn.\")\n 'cursor_trail': bool,\n\n //- rjf: thread & breakpoint decorations\n @default(1) @display_name('Thread Lines') @description(\"Controls whether or not a long horizontal line is drawn before the next line or instruction that the selected thread will execute in source and disassembly views.\")\n 'thread_lines': bool,\n @default(1) @display_name('Thread Glow') @description(\"Controls whether or not a glowing effect is drawn on the selected thread in source and disassembly views.\")\n 'thread_glow': bool,\n @default(1) @display_name('Breakpoint Lines') @description(\"Controls whether or not a long horizontal line is drawn before the line or instruction at which a breakpoint is placed, in source and disassembly views.\")\n 'breakpoint_lines': bool,\n @default(1) @display_name('Breakpoint Glow') @description(\"Controls whether or not a glowing effect is drawn on breakpoints in source and disassembly views.\")\n 'breakpoint_glow': bool,\n\n //- rjf: occluding background settings\n @default(0) @display_name('Opaque Backgrounds') @description(\"Controls whether or not all floating background colors are forced to be fully opaque.\")\n 'opaque_backgrounds': bool,\n @default(1) @display_name('Background Blur') @description(\"Controls whether or not occluded regions behind floating elements are blurred.\")\n 'background_blur': bool,\n\n //- rjf: appearance settings\n @default(1) @display_name('Drop Shadows') @description(\"Controls whether or not drop shadows are drawn.\")\n 'drop_shadows': bool,\n @default(1.f) @display_name('Rounded Corner Amount') @description(\"Controls the degree to which UI corners are rounded.\")\n 'rounded_corner_amount': @range[0, 1] f32,\n\n //- rjf: code formatting settings\n @default(2) @display_name('User Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: windows style menu bar\n @default(1) @display_name('Focus Menu Bar With Alt') @description(\"Mimics standard Windows behavior of focusing the menu bar using the Alt key.\")\n 'focus_menu_bar_with_alt': bool,\n\n //- rjf: native filesystem dialogues\n @default(0) @display_name('Use Native File System Dialog') @description(\"Uses the operating system's file system dialog box, rather than the debugger's built-in UI.\")\n 'use_native_file_system_dialog': bool,\n\n //- rjf: transient tabs\n @default(1) @display_name('Transient Tabs') @description(\"When snapping to source code locations, opens new files in a 'transient' tab if they are not already open. Transient tabs are replaced on subsequent snaps automatically.\")\n 'transient_tabs': bool,\n}\n")},
{str8_lit_comp("project"), 0, str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @display_name('Project Name') 'name': string,\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\n @display_name('Display Pointer Addresses Before Contents') @description(\"When visualizing pointers, always shows the address first, before showing contents at the pointer's address.\")\n @default(0) display_pointer_addresses_before_contents: bool,\n @display_name('Use Default C++ STL Type Visualizers') @description(\"Enables the built-in type views for C++ STL types.\")\n @default(1) use_default_stl_type_views: bool,\n @display_name('Use Default Unreal Engine Type Visualizers') @description(\"Enables the built-in type views for Unreal Engine types.\")\n @default(1) use_default_ue_type_views: bool,\n\n //- rjf: theme\n @default(\"None\") @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme': string,\n @no_expand @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme_colors': set,\n\n //- rjf: exception settings\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\ Line truncated
@@ -463,7 +461,6 @@ RD_NameSchemaInfo rd_name_schema_info_table[40] =
{str8_lit_comp("file_path_map"), 0, str8_lit_comp("@collection_commands(add_file_path_map) @row_commands(remove_cfg) x:{'source': @no_relativize path, 'dest': @no_relativize path}")},
{str8_lit_comp("type_view"), 0, str8_lit_comp("@collection_commands(add_type_view) @row_commands(remove_cfg) x:{'type':expr_string, 'expr':expr_string}")},
{str8_lit_comp("recent_project"), 0, str8_lit_comp("x:{'path':path}")},
{str8_lit_comp("recent_file"), 0, str8_lit_comp("x:{'path':path}")},
{str8_lit_comp("machine"), 0, str8_lit_comp("x:{'label':code_string, @no_expand 'active':bool, 'unattached_processes':set, 'processes':set}")},
{str8_lit_comp("process"), 0, str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'active':bool, 'modules':set, 'threads':set}")},
{str8_lit_comp("module"), 0, str8_lit_comp("x:{'exe':path, 'dbg':path, 'vaddr_range':vaddr_range}")},
@@ -576,7 +573,7 @@ Rng1U64 rd_reg_slot_range_table[49] =
{OffsetOf(RD_Regs, wm_event), OffsetOf(RD_Regs, wm_event) + sizeof(WM_Event *)},
};
RD_CmdKindInfo rd_cmd_kind_info_table[249] =
RD_CmdKindInfo rd_cmd_kind_info_table[248] =
{
{0},
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), D_EntityKind_Null}},
@@ -671,9 +668,8 @@ RD_CmdKindInfo rd_cmd_kind_info_table[249] =
{ str8_lit_comp("tab_settings"), str8_lit_comp("Opens settings for a tab."), str8_lit_comp("view,options"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("switch"), str8_lit_comp("Switches to a recent file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_files, query:source_files"), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("switch"), str8_lit_comp("Switches to a recent file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:source_files"), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("record_file_in_project"), str8_lit_comp("Records the passed file path as a recent file in the currently loaded project."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("show_file_in_explorer"), str8_lit_comp("Opens the operating system's file explorer and shows the selected file."), str8_lit_comp(""), str8_lit_comp("$file,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*1)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
+2 -3
View File
@@ -157,7 +157,6 @@ RD_CmdKind_SetCurrentPath,
RD_CmdKind_Open,
RD_CmdKind_Switch,
RD_CmdKind_SwitchToPartnerFile,
RD_CmdKind_RecordFileInProject,
RD_CmdKind_ShowFileInExplorer,
RD_CmdKind_GoToDisassembly,
RD_CmdKind_GoToSource,
@@ -603,8 +602,8 @@ Z(getting_started)\
C_LINKAGE_BEGIN
extern String8 rd_tab_fast_path_view_name_table[25];
extern String8 rd_tab_fast_path_query_name_table[25];
extern RD_VocabInfo rd_vocab_info_table[360];
extern RD_NameSchemaInfo rd_name_schema_info_table[40];
extern RD_VocabInfo rd_vocab_info_table[358];
extern RD_NameSchemaInfo rd_name_schema_info_table[39];
extern String8 rd_reg_slot_code_name_table[49];
extern Rng1U64 rd_reg_slot_range_table[49];
extern String8 rd_binding_version_remap_old_name_table[8];
+1 -9
View File
@@ -119,7 +119,6 @@ RD_VocabTable:
{panel _ "Panel" _ Null }
{tab _ "Tab" _ Null }
{recent_project _ "Recent Project" _ Briefcase }
{recent_file _ "Recent File" _ FileOutline }
{src _ "Source" _ Null }
{dst _ "Destination" _ Null }
{source _ "Source" _ Null }
@@ -783,12 +782,6 @@ RD_VocabTable:
```x:{'path':path}```,
}
//- rjf: @schema recent_file
{
recent_file, 0,
```x:{'path':path}```,
}
//- rjf: @schema machine
{
machine, 0,
@@ -1029,9 +1022,8 @@ RD_CmdTable: // | | | |
//- 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." "" "" }
{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" "" }
{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," }
//- rjf: source <-> disasm
+42 -59
View File
@@ -152,7 +152,7 @@ internal B32
rd_cfg_is_project_filtered(CFG_Node *cfg)
{
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;
}
@@ -2412,11 +2412,7 @@ rd_view_ui(Rng2F32 rect)
case RD_EvalSpaceKind_MetaCfg:
{
CFG_Node *cfg = rd_cfg_from_eval_space(eval.space);
if(str8_match(cfg->string, str8_lit("recent_file"), 0))
{
rd_cmd(RD_CmdKind_Switch, .cfg = cfg->id);
}
else if(str8_match(cfg->string, str8_lit("recent_project"), 0))
if(str8_match(cfg->string, str8_lit("recent_project"), 0))
{
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)
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)
{
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"));
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
CFG_Node *di = n->v;
String8 path = rd_path_from_cfg(di);
@@ -11103,6 +11105,7 @@ rd_frame(void)
for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{
CFG_Node *di = n->v;
if(rd_cfg_is_project_filtered(di)) { continue; }
String8 path = rd_path_from_cfg(di);
CFG_Node *timestamp_node = cfg_node_child_from_string(di, str8_lit("timestamp"));
U64 timestamp = 0;
@@ -11385,7 +11388,6 @@ rd_frame(void)
str8_lit("file_path_map"),
str8_lit("type_view"),
str8_lit("recent_project"),
str8_lit("recent_file"),
};
for EachElement(cfg_name_idx, evallable_cfg_names)
{
@@ -11491,6 +11493,10 @@ rd_frame(void)
CFG_Node *watch_tab = n->v;
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))
{
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: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:machines");
str8_list_pushf(scratch.arena, &exprs, "query:processes");
@@ -12630,7 +12635,7 @@ rd_frame(void)
}
//- 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);
}
@@ -12652,15 +12657,17 @@ rd_frame(void)
{
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)
{
CFG_Node *tab = tab_n->v;
if(!rd_cfg_is_project_filtered(tab))
{
rd_cmd(RD_CmdKind_FocusTab, .tab = tab->id);
fallback_tab = tab;
break;
}
}
rd_cmd(RD_CmdKind_FocusTab, .tab = fallback_tab->id);
}
}
}
@@ -12712,6 +12719,7 @@ rd_frame(void)
}
}break;
case RD_CmdKind_RecordProjectInUser:
if(rd_regs()->file_path.size != 0)
{
String8 file_path = rd_regs()->file_path;
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);
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));
}
else
@@ -13611,17 +13618,7 @@ rd_frame(void)
}break;
case RD_CmdKind_Switch:
{
String8 path = {0};
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;
}
String8 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);
}break;
case RD_CmdKind_SwitchToPartnerFile:
@@ -13655,35 +13652,6 @@ rd_frame(void)
}
}
}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:
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("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("project")), rd_state->project_path);
}
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_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
@@ -14765,9 +14735,6 @@ rd_frame(void)
}
rd_cmd(cursor_snap_kind);
}
// rjf: record
rd_cmd(RD_CmdKind_RecordFileInProject, .file_path = file_path);
}
// rjf: snap to disasm
@@ -15242,10 +15209,12 @@ rd_frame(void)
//- rjf: debug infos
case RD_CmdKind_LoadDebugInfo:
{
CFG_Node *project = cfg_node_child_from_string(cfg_node_root(), str8_lit("project"));
CFG_Node *di = cfg_node_new(rd_state->cfg, project, str8_lit("debug_info"));
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
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_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;
case RD_CmdKind_UnloadDebugInfo:
{
@@ -15411,6 +15380,10 @@ rd_frame(void)
CFG_Node *existing_watch = &cfg_nil_node;
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))
{
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"));
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);
}
}
@@ -16375,6 +16352,10 @@ rd_frame(void)
for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
{
CFG_Node *di = n->v;
if(rd_cfg_is_project_filtered(di))
{
continue;
}
String8 path = rd_path_from_cfg(di);
if(str8_match(path, new_path, 0))
{
@@ -16385,12 +16366,14 @@ rd_frame(void)
}
if(!path_found)
{
CFG_Node *project = cfg_node_child_from_string(cfg_node_root(), str8_lit("project"));
CFG_Node *di = cfg_node_new(rd_state->cfg, project, str8_lit("debug_info"));
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
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 *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_newf(rd_state->cfg, timestamp_root, "%I64u", debug_info_path->timestamp);
cfg_node_new(rd_state->cfg, project_root, rd_state->project_path);
}
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);
//- 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
String8List cmds_list = {0};
@@ -851,6 +862,10 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(cfgs_slice)
for EachIndex(idx, ext->cfgs.count)
{
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);
String8 string = dr_string_from_fstrs(scratch.arena, &fstrs);
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_Space space = interpret.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)
{
if(rd_cfg_is_project_filtered(child)) {continue;}
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);
}
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
if(str8_match(tln->string, str8_lit("recent_file"), 0) ||
str8_match(tln->string, str8_lit("recent_project"), 0))
if(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_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/)
////////////////////////////////
//~ rjf: post-0.9.25 TODO notes
//~ rjf: post-0.9.26 TODO notes
//
// [ ] "autos" collection, which can be evaluated
// [ ] show "autos" inline in source code near thread?
@@ -18,7 +18,6 @@
//
// [ ] linux/dwarf fixes
// [ ] 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
//
// [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception!
@@ -270,6 +269,7 @@
// [x] new project / user should not require picking a path; should just
// by default go to "untitled" in default user path
// [x] memory view mutation controls
// [x] step-over/step-into doesn't step successfully in many cases, just causes a continue
////////////////////////////////
//~ rjf: Build Options