mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-24 23:02:20 -08:00
processless debug info loading/unloading; separate modules from dbg infos in eval; keep dbg infos around after debugging via config, correllate to new modules, evict when necessary, when generating new versions
This commit is contained in:
1 parent
f9d1ffa5fc
commit
c8c25c0f98
21 files changed
+1289
-899
No files matched your search
@@ -4,7 +4,7 @@
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
String8 rd_tab_fast_path_view_name_table[24] =
|
||||
String8 rd_tab_fast_path_view_name_table[25] =
|
||||
{
|
||||
str8_lit_comp("watch"),
|
||||
str8_lit_comp("watch"),
|
||||
@@ -23,6 +23,7 @@ str8_lit_comp("watch"),
|
||||
str8_lit_comp("watch"),
|
||||
str8_lit_comp("watch"),
|
||||
str8_lit_comp("watch"),
|
||||
str8_lit_comp("watch"),
|
||||
str8_lit_comp("text"),
|
||||
str8_lit_comp("text"),
|
||||
str8_lit_comp("disasm"),
|
||||
@@ -32,7 +33,7 @@ str8_lit_comp("color"),
|
||||
str8_lit_comp("geo3d"),
|
||||
};
|
||||
|
||||
String8 rd_tab_fast_path_query_name_table[24] =
|
||||
String8 rd_tab_fast_path_query_name_table[25] =
|
||||
{
|
||||
str8_lit_comp(""),
|
||||
str8_lit_comp("query:locals"),
|
||||
@@ -45,6 +46,7 @@ str8_lit_comp("query:call_stack"),
|
||||
str8_lit_comp("query:targets"),
|
||||
str8_lit_comp("query:breakpoints"),
|
||||
str8_lit_comp("query:watch_pins"),
|
||||
str8_lit_comp("query:debug_infos"),
|
||||
str8_lit_comp("query:threads"),
|
||||
str8_lit_comp("query:processes"),
|
||||
str8_lit_comp("query:machines"),
|
||||
@@ -60,11 +62,12 @@ str8_lit_comp(""),
|
||||
str8_lit_comp(""),
|
||||
};
|
||||
|
||||
RD_VocabInfo rd_vocab_info_table[352] =
|
||||
RD_VocabInfo rd_vocab_info_table[357] =
|
||||
{
|
||||
{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},
|
||||
{str8_lit_comp("watch_pin"), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pin"), str8_lit_comp("Watch Pins"), RD_IconKind_Pin},
|
||||
{str8_lit_comp("debug_info"), str8_lit_comp("debug_infos"), str8_lit_comp("Debug Info"), str8_lit_comp("Debug Info"), RD_IconKind_Module},
|
||||
{str8_lit_comp("watch"), str8_lit_comp("watches"), str8_lit_comp("Watch"), str8_lit_comp("Watches"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("view"), str8_lit_comp("views"), str8_lit_comp("View"), str8_lit_comp("Views"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("breakpoint"), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoint"), str8_lit_comp("Breakpoints"), RD_IconKind_CircleFilled},
|
||||
@@ -170,6 +173,7 @@ RD_VocabInfo rd_vocab_info_table[352] =
|
||||
{str8_lit_comp("row_height"), str8_lit_comp(""), str8_lit_comp("Row Height"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("tab_height"), str8_lit_comp(""), str8_lit_comp("Tab Height"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("rgba"), str8_lit_comp(""), str8_lit_comp("RGBA"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("path"), str8_lit_comp(""), str8_lit_comp("Path"), str8_lit_comp(""), RD_IconKind_FileOutline},
|
||||
{str8_lit_comp("launch_and_run"), str8_lit_comp(""), str8_lit_comp("Launch and Run"), str8_lit_comp(""), RD_IconKind_Play},
|
||||
{str8_lit_comp("launch_and_step_into"), str8_lit_comp(""), str8_lit_comp("Launch and Step Into"), str8_lit_comp(""), RD_IconKind_PlayStepForward},
|
||||
{str8_lit_comp("kill"), str8_lit_comp(""), str8_lit_comp("Kill"), str8_lit_comp(""), RD_IconKind_X},
|
||||
@@ -361,6 +365,8 @@ RD_VocabInfo rd_vocab_info_table[352] =
|
||||
{str8_lit_comp("clear_output"), str8_lit_comp(""), str8_lit_comp("Clear Output"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||
{str8_lit_comp("load_debug_info"), str8_lit_comp(""), str8_lit_comp("Load Debug Info"), str8_lit_comp(""), RD_IconKind_Module},
|
||||
{str8_lit_comp("unload_debug_info"), str8_lit_comp(""), str8_lit_comp("Unload Debug Info"), str8_lit_comp(""), RD_IconKind_Module},
|
||||
{str8_lit_comp("add_type_view"), str8_lit_comp(""), str8_lit_comp("Add Type View"), str8_lit_comp(""), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("add_file_path_map"), str8_lit_comp(""), str8_lit_comp("Add File Path Map"), str8_lit_comp(""), RD_IconKind_FileOutline},
|
||||
{str8_lit_comp("edit_user_theme"), str8_lit_comp(""), str8_lit_comp("Edit User Theme"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
@@ -401,6 +407,7 @@ RD_VocabInfo rd_vocab_info_table[352] =
|
||||
{str8_lit_comp("targets"), str8_lit_comp(""), str8_lit_comp("Targets"), str8_lit_comp(""), RD_IconKind_Target},
|
||||
{str8_lit_comp("breakpoints"), str8_lit_comp(""), str8_lit_comp("Breakpoints"), str8_lit_comp(""), RD_IconKind_CircleFilled},
|
||||
{str8_lit_comp("watch_pins"), str8_lit_comp(""), str8_lit_comp("Watch Pins"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||
{str8_lit_comp("debug_infos"), str8_lit_comp(""), str8_lit_comp("Debug Info"), str8_lit_comp(""), RD_IconKind_Module},
|
||||
{str8_lit_comp("threads"), str8_lit_comp(""), str8_lit_comp("Threads"), str8_lit_comp(""), RD_IconKind_Threads},
|
||||
{str8_lit_comp("processes"), str8_lit_comp(""), str8_lit_comp("Processes"), str8_lit_comp(""), RD_IconKind_Scheduler},
|
||||
{str8_lit_comp("machines"), str8_lit_comp(""), str8_lit_comp("Machines"), str8_lit_comp(""), RD_IconKind_Machine},
|
||||
@@ -416,7 +423,7 @@ RD_VocabInfo rd_vocab_info_table[352] =
|
||||
{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[25] =
|
||||
RD_NameSchemaInfo rd_name_schema_info_table[26] =
|
||||
{
|
||||
{str8_lit_comp("user"), 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': query,\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\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")},
|
||||
{str8_lit_comp("project"), str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\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': query,\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\") @description(\"Code: 0xc0000096\")\n win32_privileged_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Stack Overflow Exceptions\") @description(\"Code: 0xc00000fd\")\n win32_stack_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Unable To Locate DLL Exceptions\") @desLine truncated
|
||||
@@ -435,6 +442,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[25] =
|
||||
{str8_lit_comp("target"), str8_lit_comp("@row_commands(@cmd_line save_cfg_to_project, enable_cfg, launch_and_run, launch_and_step_into, duplicate_cfg, remove_cfg)\n@collection_commands(add_target)\nx:\n{\n 'label': code_string,\n 'executable': path,\n 'arguments': string,\n 'working_directory': path,\n 'entry_point': expr_string,\n 'stdout_path': @no_relativize path,\n 'stderr_path': @no_relativize path,\n 'stdin_path': @no_relativize path,\n 'environment': query,\n 'debug_subprocesses': bool,\n @no_revert @no_expand @default(0) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("breakpoint"), str8_lit_comp("@row_commands(enable_cfg, duplicate_cfg, remove_cfg)\n@collection_commands(toggle_breakpoint, add_breakpoint, add_address_breakpoint, add_function_breakpoint, clear_breakpoints)\nx:\n{\n 'label': code_string,\n 'condition': expr_string,\n 'source_location': path_pt,\n 'address_location': expr_string,\n 'hit_count': u64,\n 'address_range_size': @or(0, 1, 2, 4, 8) u64,\n 'break_on_write': bool,\n 'break_on_read': bool,\n 'break_on_execute': bool,\n @no_revert @no_expand @default(1) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("watch_pin"), str8_lit_comp("@row_commands(duplicate_cfg, remove_cfg)\n@collection_commands(add_watch_pin, toggle_watch_pin)\nx:\n{\n 'expression': expr_string,\n 'source_location': path_pt,\n 'address_location': expr_string,\n}\n")},
|
||||
{str8_lit_comp("debug_info"), str8_lit_comp("@row_commands(enable_cfg, duplicate_cfg, remove_cfg)\n@collection_commands(load_debug_info)\nx:\n{\n 'path': @no_relativize path,\n @no_revert @no_expand @default(1) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("file_path_map"), 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"), str8_lit_comp("@collection_commands(add_type_view) @row_commands(remove_cfg) x:{'type':expr_string, 'expr':expr_string}")},
|
||||
{str8_lit_comp("recent_project"), str8_lit_comp("x:{'path':path}")},
|
||||
@@ -547,7 +555,7 @@ Rng1U64 rd_reg_slot_range_table[47] =
|
||||
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
|
||||
};
|
||||
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[245] =
|
||||
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(""), CTRL_EntityKind_Null}},
|
||||
@@ -741,6 +749,8 @@ RD_CmdKindInfo rd_cmd_kind_info_table[245] =
|
||||
{ str8_lit_comp("clear_output"), str8_lit_comp("Clears all output."), str8_lit_comp(""), 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(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), 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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("load_debug_info"), str8_lit_comp("Loads a debug info file."), str8_lit_comp(""), str8_lit_comp("$debug_infos,"), (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(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("unload_debug_info"), str8_lit_comp("Unloads a debug info file."), str8_lit_comp(""), str8_lit_comp("$debug_infos,"), (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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:debug_infos"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_type_view"), str8_lit_comp("Adds a new type view."), 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_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_file_path_map"), str8_lit_comp("Adds a new file path map."), 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(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("edit_user_theme"), str8_lit_comp("Edits the current user's theme."), str8_lit_comp("color"), 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_String, str8_lit_comp("query:themes"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -781,6 +791,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[245] =
|
||||
{ str8_lit_comp("targets"), str8_lit_comp("Opens a Targets tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens a Breakpoints tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens a Watch Pins tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("debug_infos"), str8_lit_comp("Opens a Debug Info tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("threads"), str8_lit_comp("Opens a Threads tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("processes"), str8_lit_comp("Opens a Processes tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
{ str8_lit_comp("machines"), str8_lit_comp("Opens a Machines tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
|
||||
@@ -252,6 +252,8 @@ RD_CmdKind_ListBreakpoints,
|
||||
RD_CmdKind_ClearOutput,
|
||||
RD_CmdKind_AddWatchPin,
|
||||
RD_CmdKind_ToggleWatchPin,
|
||||
RD_CmdKind_LoadDebugInfo,
|
||||
RD_CmdKind_UnloadDebugInfo,
|
||||
RD_CmdKind_AddTypeView,
|
||||
RD_CmdKind_AddFilePathMap,
|
||||
RD_CmdKind_EditUserTheme,
|
||||
@@ -292,6 +294,7 @@ RD_CmdKind_OpenCallStack,
|
||||
RD_CmdKind_OpenTargets,
|
||||
RD_CmdKind_OpenBreakpoints,
|
||||
RD_CmdKind_OpenWatchPins,
|
||||
RD_CmdKind_OpenDebugInfos,
|
||||
RD_CmdKind_OpenThreads,
|
||||
RD_CmdKind_OpenProcesses,
|
||||
RD_CmdKind_OpenMachines,
|
||||
@@ -525,6 +528,7 @@ X(call_stack) \
|
||||
X(targets) \
|
||||
X(breakpoints) \
|
||||
X(watch_pins) \
|
||||
X(debug_infos) \
|
||||
X(threads) \
|
||||
X(processes) \
|
||||
X(machines) \
|
||||
@@ -589,10 +593,10 @@ Z(getting_started)\
|
||||
.os_event = rd_regs()->os_event,\
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 rd_tab_fast_path_view_name_table[24];
|
||||
extern String8 rd_tab_fast_path_query_name_table[24];
|
||||
extern RD_VocabInfo rd_vocab_info_table[352];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[25];
|
||||
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[357];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[26];
|
||||
extern String8 rd_reg_slot_code_name_table[47];
|
||||
extern Rng1U64 rd_reg_slot_range_table[47];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
|
||||
@@ -33,6 +33,7 @@ RD_WatchTabFastPathTable:
|
||||
{Targets "Targets" targets 1 Target "Displays, and allows editing of, the list of all targets."}
|
||||
{Breakpoints "Breakpoints" breakpoints 1 CircleFilled "Displays, and allows editing of, the list of all breakpoints."}
|
||||
{WatchPins "Watch Pins" watch_pins 1 Pin "Displays, and allows editing of, the list of all watch pins."}
|
||||
{DebugInfos "Debug Info" debug_infos 1 Module "Displays, and allows editing of, the list of all debug info files that the debugger has loaded."}
|
||||
{Threads "Threads" threads 1 Threads "Displays the list of all threads in all processes to which the debugger is attached."}
|
||||
{Processes "Processes" processes 1 Scheduler "Displays the list of all processes to which the debugger is attached."}
|
||||
{Machines "Machines" machines 1 Machine "Displays the list of all machines to which the debugger is connected."}
|
||||
@@ -91,6 +92,7 @@ RD_VocabTable:
|
||||
{type_view _ "Type View" _ Binoculars }
|
||||
{file_path_map _ "File Path Map" _ FileOutline }
|
||||
{watch_pin _ "Watch Pin" _ Pin }
|
||||
{debug_info _ "Debug Info" "Debug Info" Module }
|
||||
{watch watches "Watch" "Watches" Binoculars }
|
||||
{view _ "View" _ Binoculars }
|
||||
{breakpoint _ "Breakpoint" _ CircleFilled }
|
||||
@@ -196,6 +198,7 @@ RD_VocabTable:
|
||||
{row_height "" "Row Height" "" Null }
|
||||
{tab_height "" "Tab Height" "" Null }
|
||||
{rgba "" "RGBA" "" Palette }
|
||||
{path "" "Path" "" FileOutline }
|
||||
}
|
||||
|
||||
@struct RD_VocabInfo:
|
||||
@@ -657,6 +660,20 @@ RD_VocabTable:
|
||||
```,
|
||||
}
|
||||
|
||||
//- rjf: debug infos
|
||||
{
|
||||
debug_info,
|
||||
```
|
||||
@row_commands(enable_cfg, duplicate_cfg, remove_cfg)
|
||||
@collection_commands(load_debug_info)
|
||||
x:
|
||||
{
|
||||
'path': @no_relativize path,
|
||||
@no_revert @no_expand @default(1) 'enabled': bool,
|
||||
}
|
||||
```,
|
||||
}
|
||||
|
||||
//- rjf: file path maps
|
||||
{
|
||||
file_path_map,
|
||||
@@ -1044,6 +1061,10 @@ RD_CmdTable: // | | | |
|
||||
{AddWatchPin 1 1 0 0 "" Expr null Nil Null 0 0 0 0 1 1 1 Pin "add_watch_pin" "Add Watch Pin" "Places a watch pin at a given location (file path and line number or address)." "" "$watch_pins," }
|
||||
{ToggleWatchPin 1 0 0 0 "" Expr null Nil Null 0 0 0 0 1 1 1 Pin "toggle_watch_pin" "Toggle Watch Pin" "Places or removes a watch pin at a given location (file path and line number or address)." "" "" }
|
||||
|
||||
//- rjf: debug infos
|
||||
{LoadDebugInfo 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Module "load_debug_info" "Load Debug Info" "Loads a debug info file." "" "$debug_infos," }
|
||||
{UnloadDebugInfo 1 1 0 0 "query:debug_infos" Cfg null Nil Null 0 0 0 0 1 1 1 Module "unload_debug_info" "Unload Debug Info" "Unloads a debug info file." "" "$debug_infos," }
|
||||
|
||||
//- rjf: type views
|
||||
{AddTypeView 0 0 0 0 "" String null Nil Null 0 0 0 0 0 0 0 Binoculars "add_type_view" "Add Type View" "Adds a new type view." "" "" }
|
||||
|
||||
|
||||
+235
-16
@@ -3998,7 +3998,9 @@ rd_view_ui(Rng2F32 rect)
|
||||
|
||||
// rjf: apply type note
|
||||
if(!(cell_info.flags & RD_WatchCellFlag_NoEval) &&
|
||||
cell->eval.space.kind == CTRL_EvalSpaceKind_Entity &&
|
||||
e_type_kind_from_key(cell->eval.irtree.type_key) != E_TypeKind_Null &&
|
||||
(cell->eval.space.kind == E_SpaceKind_Null ||
|
||||
cell->eval.space.kind == CTRL_EvalSpaceKind_Entity) &&
|
||||
row_info->callstack_thread == &ctrl_entity_nil &&
|
||||
e_type_kind_from_key(cell->eval.irtree.type_key) != E_TypeKind_Function)
|
||||
UI_FontSize(ui_top_font_size()*0.9f)
|
||||
@@ -9310,7 +9312,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)
|
||||
{
|
||||
DI_Match match = di_match_from_string(string, 0, e_base_ctx->primary_module->dbgi_key, 0);
|
||||
DI_Match match = di_match_from_string(string, 0, di_key_zero(), 0);
|
||||
RDI_SectionKind section_kind = match.section_kind;
|
||||
mapped = 1;
|
||||
switch(section_kind)
|
||||
@@ -10310,6 +10312,73 @@ rd_frame(void)
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: iterate all loaded debug infos, remove hot markers
|
||||
//
|
||||
if(rd_state->frame_depth == 1)
|
||||
{
|
||||
CFG_Node *transient = cfg_node_child_from_string(cfg_node_root(), str8_lit("transient"));
|
||||
CFG_Node *loaded_debug_infos = cfg_node_child_from_string_or_alloc(rd_state->cfg, transient, str8_lit("loaded_debug_infos"));
|
||||
for(CFG_Node *child = loaded_debug_infos->first; child != &cfg_nil_node; child = child->next)
|
||||
{
|
||||
cfg_node_release(rd_state->cfg, cfg_node_child_from_string(child, str8_lit("hot")));
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: iterate all loaded debug infos, touch their dbgi load markers
|
||||
//
|
||||
if(rd_state->frame_depth == 1)
|
||||
{
|
||||
CFG_Node *transient = cfg_node_child_from_string(cfg_node_root(), str8_lit("transient"));
|
||||
CFG_Node *loaded_debug_infos = cfg_node_child_from_string_or_alloc(rd_state->cfg, transient, str8_lit("loaded_debug_infos"));
|
||||
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)
|
||||
{
|
||||
CFG_Node *di = n->v;
|
||||
String8 path = rd_path_from_cfg(di);
|
||||
CFG_Node *di_timestamp = cfg_node_child_from_string(di, str8_lit("timestamp"));
|
||||
U64 timestamp = 0;
|
||||
try_u64_from_str8_c_rules(di_timestamp->first->string, ×tamp);
|
||||
String8 loaded_di_key = push_str8f(scratch.arena, "$%I64x `%S` `%I64u`", di->id, path, timestamp);
|
||||
CFG_Node *loaded_di = cfg_node_child_from_string(loaded_debug_infos, loaded_di_key);
|
||||
if(loaded_di == &cfg_nil_node)
|
||||
{
|
||||
loaded_di = cfg_node_new(rd_state->cfg, loaded_debug_infos, loaded_di_key);
|
||||
CFG_Node *path_node = cfg_node_new(rd_state->cfg, loaded_di, str8_lit("path"));
|
||||
cfg_node_new(rd_state->cfg, path_node, path);
|
||||
CFG_Node *timestamp_node = cfg_node_new(rd_state->cfg, loaded_di, str8_lit("timestamp"));
|
||||
cfg_node_new(rd_state->cfg, timestamp_node, di_timestamp->first->string);
|
||||
DI_Key dbgi_key = di_key_from_path_timestamp(path, timestamp);
|
||||
di_open(dbgi_key);
|
||||
}
|
||||
cfg_node_child_from_string_or_alloc(rd_state->cfg, loaded_di, str8_lit("hot"));
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: iterate all loaded debug infos, close those without hot markers
|
||||
//
|
||||
if(rd_state->frame_depth == 1)
|
||||
{
|
||||
CFG_Node *transient = cfg_node_child_from_string(cfg_node_root(), str8_lit("transient"));
|
||||
CFG_Node *loaded_debug_infos = cfg_node_child_from_string_or_alloc(rd_state->cfg, transient, str8_lit("loaded_debug_infos"));
|
||||
for(CFG_Node *child = loaded_debug_infos->first, *next = &cfg_nil_node; child != &cfg_nil_node; child = next)
|
||||
{
|
||||
next = child->next;
|
||||
if(cfg_node_child_from_string(child, str8_lit("hot")) == &cfg_nil_node)
|
||||
{
|
||||
CFG_Node *path_node = cfg_node_child_from_string(child, str8_lit("path"));
|
||||
CFG_Node *timestamp_node = cfg_node_child_from_string(child, str8_lit("timestamp"));
|
||||
U64 timestamp = 0;
|
||||
try_u64_from_str8_c_rules(timestamp_node->first->string, ×tamp);
|
||||
DI_Key dbgi_key = di_key_from_path_timestamp(path_node->first->string, timestamp);
|
||||
di_close(dbgi_key, 0);
|
||||
cfg_node_release(rd_state->cfg, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: garbage collect untouched immediate cfg trees
|
||||
//
|
||||
@@ -10776,7 +10845,56 @@ rd_frame(void)
|
||||
ProfScope("loop - consume events in core, tick engine, and repeat") for(U64 cmd_process_loop_idx = 0; cmd_process_loop_idx < 3; cmd_process_loop_idx += 1)
|
||||
{
|
||||
////////////////////////////
|
||||
//- rjf: unpack eval-dependent info
|
||||
//- rjf: gather all unique debug info keys, build map
|
||||
//
|
||||
typedef struct DbgInfoNode DbgInfoNode;
|
||||
struct DbgInfoNode
|
||||
{
|
||||
DbgInfoNode *hash_next;
|
||||
DbgInfoNode *order_next;
|
||||
DI_Key key;
|
||||
U64 idx;
|
||||
};
|
||||
U64 dbg_info_slots_count = 4096;
|
||||
DbgInfoNode **dbg_info_slots = push_array(scratch.arena, DbgInfoNode *, dbg_info_slots_count);
|
||||
DbgInfoNode *first_dbg_info = 0;
|
||||
DbgInfoNode *last_dbg_info = 0;
|
||||
U64 dbg_infos_count = 0;
|
||||
{
|
||||
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)
|
||||
{
|
||||
CFG_Node *di = n->v;
|
||||
String8 path = rd_path_from_cfg(di);
|
||||
CFG_Node *timestamp_node = cfg_node_child_from_string(di, str8_lit("timestamp"));
|
||||
U64 timestamp = 0;
|
||||
try_u64_from_str8_c_rules(timestamp_node->first->string, ×tamp);
|
||||
DI_Key key = di_key_from_path_timestamp(path, timestamp);
|
||||
U64 hash = u64_hash_from_str8(str8_struct(&key));
|
||||
U64 slot_idx = hash%dbg_info_slots_count;
|
||||
DbgInfoNode *node = 0;
|
||||
for(DbgInfoNode *n = dbg_info_slots[slot_idx]; n != 0; n = n->hash_next)
|
||||
{
|
||||
if(di_key_match(n->key, key))
|
||||
{
|
||||
node = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(node == 0)
|
||||
{
|
||||
node = push_array(scratch.arena, DbgInfoNode, 1);
|
||||
SLLStackPush_N(dbg_info_slots[slot_idx], node, hash_next);
|
||||
SLLQueuePush_N(first_dbg_info, last_dbg_info, node, order_next);
|
||||
node->key = key;
|
||||
node->idx = dbg_infos_count;
|
||||
dbg_infos_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: unpack basic evaluation context
|
||||
//
|
||||
ProfBegin("unpack eval-dependent info");
|
||||
CTRL_Entity *process = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_regs()->process);
|
||||
@@ -10787,32 +10905,67 @@ rd_frame(void)
|
||||
CTRL_Entity *module = ctrl_module_from_process_vaddr(process, rip_vaddr);
|
||||
U64 rip_voff = ctrl_voff_from_vaddr(module, rip_vaddr);
|
||||
U64 tls_root_vaddr = ctrl_tls_root_vaddr_from_thread(&d_state->ctrl_entity_store->ctx, thread->handle);
|
||||
ProfEnd();
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: produce all debug infos
|
||||
//
|
||||
U64 eval_dbg_infos_count = Max(1, dbg_infos_count);
|
||||
E_DbgInfo *eval_dbg_infos = push_array(scratch.arena, E_DbgInfo, eval_dbg_infos_count);
|
||||
E_DbgInfo *eval_dbg_infos_primary = &eval_dbg_infos[0];
|
||||
MemoryCopyStruct(eval_dbg_infos_primary, &e_dbg_info_nil);
|
||||
{
|
||||
U64 idx = 0;
|
||||
for(DbgInfoNode *n = first_dbg_info; n != 0; n = n->order_next)
|
||||
{
|
||||
eval_dbg_infos[idx].dbgi_key = n->key;
|
||||
eval_dbg_infos[idx].rdi = di_rdi_from_key(rd_state->frame_access, n->key, 0, 0);
|
||||
idx += 1;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: produce all eval modules
|
||||
//
|
||||
CTRL_EntityArray all_modules = ctrl_entity_array_from_kind(&d_state->ctrl_entity_store->ctx, CTRL_EntityKind_Module);
|
||||
U64 eval_modules_count = Max(1, all_modules.count);
|
||||
E_Module *eval_modules = push_array(scratch.arena, E_Module, eval_modules_count);
|
||||
E_Module *eval_modules_primary = &eval_modules[0];
|
||||
eval_modules_primary->rdi = &rdi_parsed_nil;
|
||||
eval_modules_primary->vaddr_range = r1u64(0, max_U64);
|
||||
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];
|
||||
DI_Key dbgi_key = ctrl_dbgi_key_from_module(m);
|
||||
eval_modules[eval_module_idx].arch = m->arch;
|
||||
eval_modules[eval_module_idx].dbgi_key = dbgi_key;
|
||||
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), CTRL_EvalSpaceKind_Entity);
|
||||
|
||||
// rjf: dbgi key -> eval dbg info num
|
||||
U32 dbg_info_num = 0;
|
||||
{
|
||||
U64 hash = u64_hash_from_str8(str8_struct(&dbgi_key));
|
||||
U64 slot_idx = hash%dbg_info_slots_count;
|
||||
for(DbgInfoNode *n = dbg_info_slots[slot_idx]; n != 0; n = n->hash_next)
|
||||
{
|
||||
if(di_key_match(n->key, dbgi_key))
|
||||
{
|
||||
dbg_info_num = n->idx+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: fill
|
||||
eval_modules[eval_module_idx].vaddr_range = m->vaddr_range;
|
||||
eval_modules[eval_module_idx].arch = m->arch;
|
||||
eval_modules[eval_module_idx].dbg_info_num = dbg_info_num;
|
||||
eval_modules[eval_module_idx].space = rd_eval_space_from_ctrl_entity(ctrl_entity_ancestor_from_kind(m, CTRL_EntityKind_Process), CTRL_EvalSpaceKind_Entity);
|
||||
if(module == m)
|
||||
{
|
||||
eval_modules_primary = &eval_modules[eval_module_idx];
|
||||
primary_dbgi_key = dbgi_key;
|
||||
eval_dbg_infos_primary = (0 < dbg_info_num && dbg_info_num <= eval_dbg_infos_count) ? &eval_dbg_infos[dbg_info_num-1] : &e_dbg_info_nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
ProfEnd();
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: begin evaluation
|
||||
@@ -10833,6 +10986,11 @@ rd_frame(void)
|
||||
ctx->thread_arch = thread->arch;
|
||||
ctx->thread_unwind_count = unwind_count;
|
||||
|
||||
//- rjf: fill debug infos
|
||||
ctx->dbg_infos = eval_dbg_infos;
|
||||
ctx->dbg_infos_count = eval_dbg_infos_count;
|
||||
ctx->primary_dbg_info = eval_dbg_infos_primary;
|
||||
|
||||
//- rjf: fill modules
|
||||
ctx->modules = eval_modules;
|
||||
ctx->modules_count = eval_modules_count;
|
||||
@@ -10959,6 +11117,7 @@ rd_frame(void)
|
||||
str8_lit("breakpoint"),
|
||||
str8_lit("watch_pin"),
|
||||
str8_lit("target"),
|
||||
str8_lit("debug_info"),
|
||||
str8_lit("file_path_map"),
|
||||
str8_lit("type_view"),
|
||||
str8_lit("recent_project"),
|
||||
@@ -11608,8 +11767,8 @@ rd_frame(void)
|
||||
E_IRCtx *ctx = ir_ctx;
|
||||
ctx->regs_map = ctrl_string2reg_from_arch(eval_base_ctx->primary_module->arch);
|
||||
ctx->reg_alias_map = ctrl_string2alias_from_arch(eval_base_ctx->primary_module->arch);
|
||||
ctx->locals_map = d_query_cached_locals_map_from_dbgi_key_voff(primary_dbgi_key, rip_voff);
|
||||
ctx->member_map = d_query_cached_member_map_from_dbgi_key_voff(primary_dbgi_key, rip_voff);
|
||||
ctx->locals_map = d_query_cached_locals_map_from_dbgi_key_voff(eval_base_ctx->primary_dbg_info->dbgi_key, rip_voff);
|
||||
ctx->member_map = d_query_cached_member_map_from_dbgi_key_voff(eval_base_ctx->primary_dbg_info->dbgi_key, rip_voff);
|
||||
ctx->macro_map = macro_map;
|
||||
ctx->auto_hook_map = auto_hook_map;
|
||||
}
|
||||
@@ -11631,7 +11790,7 @@ rd_frame(void)
|
||||
ctx->tls_base = push_array(scratch.arena, U64, 1);
|
||||
ctx->tls_base[0] = d_query_cached_tls_base_vaddr_from_process_root_rip(process, tls_root_vaddr, rip_vaddr);
|
||||
}
|
||||
e_select_interpret_ctx(interpret_ctx, eval_modules_primary->rdi, rip_voff);
|
||||
e_select_interpret_ctx(interpret_ctx, eval_dbg_infos_primary->rdi, rip_voff);
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: evaluate unpacked settings (must be used earlier than this point in the frame,
|
||||
@@ -13683,7 +13842,15 @@ rd_frame(void)
|
||||
DI_Key voff_dbgi_key = {0};
|
||||
if(!name_resolved)
|
||||
{
|
||||
DI_Match match = di_match_from_string(name, 0, e_base_ctx->primary_module->dbgi_key, 0);
|
||||
DI_Match match = {0};
|
||||
if(match.idx == 0)
|
||||
{
|
||||
match = di_match_from_string(name, 0, e_base_ctx->primary_dbg_info->dbgi_key, rd_state->frame_eval_memread_endt_us);
|
||||
}
|
||||
if(match.idx == 0)
|
||||
{
|
||||
match = di_match_from_string(name, 0, di_key_zero(), rd_state->frame_eval_memread_endt_us);
|
||||
}
|
||||
if(match.section_kind == RDI_SectionKind_Procedures)
|
||||
{
|
||||
Access *access = access_open();
|
||||
@@ -14812,6 +14979,21 @@ rd_frame(void)
|
||||
}
|
||||
}break;
|
||||
|
||||
//- 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 *path = cfg_node_new(rd_state->cfg, di, str8_lit("path"));
|
||||
cfg_node_new(rd_state->cfg, path, rd_regs()->file_path);
|
||||
}break;
|
||||
case RD_CmdKind_UnloadDebugInfo:
|
||||
{
|
||||
CFG_Node *di = cfg_node_from_id(rd_regs()->cfg);
|
||||
CFG_Node *path = cfg_node_child_from_string(di, str8_lit("path"));
|
||||
cfg_node_release(rd_state->cfg, di);
|
||||
}break;
|
||||
|
||||
//- rjf: type views
|
||||
case RD_CmdKind_AddTypeView:
|
||||
{
|
||||
@@ -15897,6 +16079,43 @@ rd_frame(void)
|
||||
switch(evt->kind)
|
||||
{
|
||||
default:{}break;
|
||||
case D_EventKind_ModuleLoad:
|
||||
{
|
||||
CTRL_Entity *module = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, evt->module);
|
||||
CTRL_Entity *debug_info_path = ctrl_entity_child_from_kind(module, CTRL_EntityKind_DebugInfoPath);
|
||||
String8 new_path = debug_info_path->string;
|
||||
if(new_path.size != 0 && os_file_path_exists(new_path))
|
||||
{
|
||||
CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info"));
|
||||
B32 path_found = 0;
|
||||
CFG_Node *found_di = &cfg_nil_node;
|
||||
for EachNode(n, CFG_NodePtrNode, dbg_infos.first)
|
||||
{
|
||||
CFG_Node *di = n->v;
|
||||
String8 path = rd_path_from_cfg(di);
|
||||
if(str8_match(path, new_path, 0))
|
||||
{
|
||||
path_found = 1;
|
||||
found_di = di;
|
||||
break;
|
||||
}
|
||||
}
|
||||
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 *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_new(rd_state->cfg, path_root, new_path);
|
||||
cfg_node_newf(rd_state->cfg, timestamp_root, "%I64u", debug_info_path->timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
CFG_Node *timestamp_root = cfg_node_child_from_string_or_alloc(rd_state->cfg, found_di, str8_lit("timestamp"));
|
||||
cfg_node_new_replacef(rd_state->cfg, timestamp_root, "%I64u", debug_info_path->timestamp);
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case D_EventKind_ProcessEnd:
|
||||
if(rd_state->quit_after_success)
|
||||
{
|
||||
|
||||
@@ -1251,9 +1251,6 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
|
||||
CTRL_Entity *selected_thread_process = ctrl_entity_ancestor_from_kind(selected_thread, CTRL_EntityKind_Process);
|
||||
U64 selected_thread_rip_unwind_vaddr = d_query_cached_rip_from_thread_unwind(selected_thread, rd_regs()->unwind_count);
|
||||
CTRL_Entity *selected_thread_module = ctrl_module_from_process_vaddr(selected_thread_process, selected_thread_rip_unwind_vaddr);
|
||||
F32 selected_thread_alive_t = ui_anim(ui_key_from_stringf(ui_key_zero(), "###selected_thread_alive_t_%p", selected_thread), 1.f);
|
||||
F32 selected_thread_module_alive_t = ui_anim(ui_key_from_stringf(ui_key_zero(), "###selected_thread_module_alive_t_%p", selected_thread_module), 1.f);
|
||||
F32 selected_thread_arch_alive_t = ui_anim(ui_key_from_stringf(ui_key_zero(), "###selected_thread_arch_alive_t_%i", selected_thread->arch), 1.f);
|
||||
CTRL_Event stop_event = d_ctrl_last_stop_event();
|
||||
CTRL_Entity *stopper_thread = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, stop_event.entity);
|
||||
B32 is_focused = ui_is_focus_active();
|
||||
@@ -1552,9 +1549,9 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
|
||||
line_num <= params->line_num_range.max;
|
||||
line_num += 1, line_idx += 1)
|
||||
{
|
||||
CTRL_EntityList line_ips = params->line_ips[line_idx];
|
||||
CFG_NodePtrList line_bps = params->line_bps[line_idx];
|
||||
CFG_NodePtrList line_pins = params->line_pins[line_idx];
|
||||
CTRL_EntityList line_ips = params->line_ips[line_idx];
|
||||
CFG_NodePtrList line_bps = params->line_bps[line_idx];
|
||||
CFG_NodePtrList line_pins = params->line_pins[line_idx];
|
||||
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
|
||||
ui_set_next_background_color(v4f32(0, 0, 0, 0));
|
||||
UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num);
|
||||
|
||||
Reference in new issue
Block a user