begin sketching out live cfg mutation code, as replacement for frontend entity tree formation/mutation

This commit is contained in:
Ryan Fleury
2024-09-03 15:20:04 -07:00
parent 06a685221a
commit c8c9c7ea27
13 changed files with 859 additions and 655 deletions
+63
View File
@@ -1665,6 +1665,69 @@ wrapped_lines_from_string(Arena *arena, String8 string, U64 first_line_max_width
return list;
}
////////////////////////////////
//~ rjf: Text Escaping
internal String8
escaped_from_raw_string(Arena *arena, String8 string)
{
Temp scratch = scratch_begin(&arena, 1);
String8List parts = {0};
U64 split_start_idx = 0;
for(U64 idx = 0; idx <= string.size; idx += 1)
{
U8 byte = (idx < string.size ? string.str[idx] : 0);
if(byte == 0 || byte == '\"' || byte == '\\')
{
String8 part = str8_substr(string, r1u64(split_start_idx, idx));
str8_list_push(scratch.arena, &parts, part);
switch(byte)
{
default:{}break;
case '\"':{str8_list_push(scratch.arena, &parts, str8_lit("\\\""));}break;
case '\\':{str8_list_push(scratch.arena, &parts, str8_lit("\\\\"));}break;
}
split_start_idx = idx+1;
}
}
StringJoin join = {0};
String8 result = str8_list_join(arena, &parts, &join);
scratch_end(scratch);
return result;
}
internal String8
raw_from_escaped_string(Arena *arena, String8 string)
{
Temp scratch = scratch_begin(&arena, 1);
String8List parts = {0};
U64 split_start_idx = 0;
U64 extra_advance = 0;
for(U64 idx = 0; idx <= string.size; ((idx += 1+extra_advance), extra_advance=0))
{
U8 byte = (idx < string.size ? string.str[idx] : 0);
if(byte == 0 || byte == '\\')
{
String8 part = str8_substr(string, r1u64(split_start_idx, idx));
str8_list_push(scratch.arena, &parts, part);
if(byte == '\\' && idx+1 < string.size)
{
switch(string.str[idx+1])
{
default:{}break;
case '"': {extra_advance = 1; str8_list_push(scratch.arena, &parts, str8_lit("\""));}break;
case '\\':{extra_advance = 1; str8_list_push(scratch.arena, &parts, str8_lit("\\"));}break;
}
}
split_start_idx = idx+1+extra_advance;
}
}
StringJoin join = {0};
String8 result = str8_list_join(arena, &parts, &join);
scratch_end(scratch);
return result;
}
////////////////////////////////
//~ rjf: String <-> Color
+6
View File
@@ -336,6 +336,12 @@ internal String8 indented_from_string(Arena *arena, String8 string);
internal String8List wrapped_lines_from_string(Arena *arena, String8 string, U64 first_line_max_width, U64 max_width, U64 wrap_indent);
////////////////////////////////
//~ rjf: Text Escaping
internal String8 escaped_from_raw_string(Arena *arena, String8 string);
internal String8 raw_from_escaped_string(Arena *arena, String8 string);
////////////////////////////////
//~ rjf: String <-> Color
-49
View File
@@ -200,58 +200,9 @@ D_MsgKindTable:
{FreezeLocalMachine "Freeze Local Machine" freeze_local_machine 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ThawLocalMachine "Thaw Local Machine" thaw_local_machine 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: path overrides
{SetPathMapSrc "Set Path Map Source" set_path_map_src 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SetPathMapDst "Set Path Map Destination" set_path_map_dst 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SetFileReplacementPath "Set File Replacement Path" set_file_replacement_path 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: auto view rules
{SetAutoViewRuleType "Set Auto View Rule Type" set_auto_view_rule_type 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SetAutoViewRuleViewRule "Set Auto View Rule View Rule" set_auto_view_rule_view_rule 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: general entity operations
{EnableEntity "Enable Entity" enable_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{EnableBreakpoint "Enable Breakpoint" enable_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{EnableTarget "Enable Target" enable_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableEntity "Disable Entity" disable_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableBreakpoint "Disable Breakpoint" disable_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableTarget "Disable Target" disable_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveEntity "Remove Entity" remove_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveBreakpoint "Remove Breakpoint" remove_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveTarget "Remove Target" remove_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NameEntity "Name Entity" name_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DuplicateEntity "Duplicate Entity" duplicate_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RelocateEntity "Relocate Entity" relocate_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: breakpoints
{AddBreakpoint "Add Breakpoint" add_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleBreakpoint "Toggle Breakpoint" toggle_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{AddAddressBreakpoint "Add Address Breakpoint" add_address_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{AddFunctionBreakpoint "Add Function Breakpoint" add_function_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: watch pins
{AddWatchPin "Add Watch Pin" add_watch_pin 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchPin "Toggle Watch Pin" toggle_watch_pin 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: watch expressions
{ToggleWatchExpression "Toggle Watch Expression" toggle_watch_expression 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: at-cursor operations
{ToggleBreakpointAtCursor "Toggle Breakpoint At Cursor" toggle_breakpoint_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchPinAtCursor "Toggle Watch Pin At Cursor" toggle_watch_pin_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchExpressionAtCursor "Toggle Watch Expression At Cursor" toggle_watch_expression_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToNameAtCursor "Go To Name At Cursor" go_to_name_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RunToCursor "Run To Cursor" run_to_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SetNextStatement "Set Next Statement" set_next_statement 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: targets
{AddTarget "Add Target" add_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SelectTarget "Select Target" select_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RetryEndedProcess "Retry Ended Process" retry_ended_process 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: meta
{RegisterAsJITDebugger "Register As JIT Debugger" register_as_jit_debugger 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{LogMarker "Log Marker" log_marker 0 0 Null Nil 0 0 0 0 0 0 Null ""}
}
@enum D_MsgKind:
-350
View File
@@ -7441,263 +7441,7 @@ d_tick(Arena *arena, DI_Scope *di_scope, D_CmdList *cmds, F32 dt)
d_msg(D_MsgKind_ThawMachine, .machine_id = CTRL_MachineID_Local);
}break;
//- rjf: path overrides (TODO(rjf))
case D_MsgKind_SetPathMapSrc:{}break;
case D_MsgKind_SetPathMapDst:{}break;
case D_MsgKind_SetFileReplacementPath:{}break;
//- rjf: auto view rules (TODO(rjf))
case D_MsgKind_SetAutoViewRuleType:{}break;
case D_MsgKind_SetAutoViewRuleViewRule:{}break;
//- rjf: general entity operations
case D_MsgKind_EnableEntity:
case D_MsgKind_EnableBreakpoint:
case D_MsgKind_EnableTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
d_entity_equip_disabled(entity, 0);
}break;
case D_MsgKind_DisableEntity:
case D_MsgKind_DisableBreakpoint:
case D_MsgKind_DisableTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
d_entity_equip_disabled(entity, 1);
}break;
case D_MsgKind_RemoveEntity:
case D_MsgKind_RemoveBreakpoint:
case D_MsgKind_RemoveTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
D_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind];
if(kind_flags & D_EntityKindFlag_CanDelete)
{
d_entity_mark_for_deletion(entity);
}
}break;
case D_MsgKind_NameEntity:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
String8 string = regs->string;
d_entity_equip_name(entity, string);
}break;
case D_MsgKind_DuplicateEntity:
{
D_Entity *src = d_entity_from_handle(regs->entity);
if(!d_entity_is_nil(src))
{
typedef struct Task Task;
struct Task
{
Task *next;
D_Entity *src_n;
D_Entity *dst_parent;
};
Task starter_task = {0, src, src->parent};
Task *first_task = &starter_task;
Task *last_task = &starter_task;
for(Task *task = first_task; task != 0; task = task->next)
{
D_Entity *src_n = task->src_n;
D_Entity *dst_n = d_entity_alloc(task->dst_parent, task->src_n->kind);
if(src_n->flags & D_EntityFlag_HasTextPoint) {d_entity_equip_txt_pt(dst_n, src_n->text_point);}
if(src_n->flags & D_EntityFlag_HasU64) {d_entity_equip_u64(dst_n, src_n->u64);}
if(src_n->flags & D_EntityFlag_HasColor) {d_entity_equip_color_hsva(dst_n, d_hsva_from_entity(src_n));}
if(src_n->flags & D_EntityFlag_HasVAddrRng) {d_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);}
if(src_n->flags & D_EntityFlag_HasVAddr) {d_entity_equip_vaddr(dst_n, src_n->vaddr);}
if(src_n->disabled) {d_entity_equip_disabled(dst_n, 1);}
if(src_n->string.size != 0) {d_entity_equip_name(dst_n, src_n->string);}
dst_n->cfg_src = src_n->cfg_src;
for(D_Entity *src_child = task->src_n->first; !d_entity_is_nil(src_child); src_child = src_child->next)
{
Task *child_task = push_array(scratch.arena, Task, 1);
child_task->src_n = src_child;
child_task->dst_parent = dst_n;
SLLQueuePush(first_task, last_task, child_task);
}
}
}
}break;
case D_MsgKind_RelocateEntity:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
D_Entity *location = d_entity_child_from_kind(entity, D_EntityKind_Location);
if(d_entity_is_nil(location))
{
location = d_entity_alloc(entity, D_EntityKind_Location);
}
location->flags &= ~D_EntityFlag_HasTextPoint;
location->flags &= ~D_EntityFlag_HasVAddr;
if(regs->cursor.line != 0)
{
d_entity_equip_txt_pt(location, regs->cursor);
}
if(regs->vaddr_range.min != 0)
{
d_entity_equip_vaddr(location, regs->vaddr_range.min);
}
if(regs->file_path.size != 0)
{
d_entity_equip_name(location, regs->file_path);
}
}break;
//- rjf: breakpoints
case D_MsgKind_AddBreakpoint:
case D_MsgKind_ToggleBreakpoint:
{
String8 file_path = regs->file_path;
TxtPt pt = regs->cursor;
String8 string = regs->string;
U64 vaddr = regs->vaddr_range.min;
B32 removed_already_existing = 0;
if(msg->kind == D_MsgKind_ToggleBreakpoint)
{
D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint);
for(D_EntityNode *n = bps.first; n != 0; n = n->next)
{
D_Entity *bp = n->entity;
D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location);
if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) ||
(loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) ||
(!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0)))
{
d_entity_mark_for_deletion(bp);
removed_already_existing = 1;
break;
}
}
}
if(!removed_already_existing)
{
D_Entity *bp = d_entity_alloc(d_entity_root(), D_EntityKind_Breakpoint);
d_entity_equip_cfg_src(bp, D_CfgSrc_Project);
D_Entity *loc = d_entity_alloc(bp, D_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
d_entity_equip_name(loc, file_path);
d_entity_equip_txt_pt(loc, pt);
}
else if(string.size != 0)
{
d_entity_equip_name(loc, string);
}
else if(vaddr != 0)
{
d_entity_equip_vaddr(loc, vaddr);
}
}
}break;
case D_MsgKind_AddAddressBreakpoint:
case D_MsgKind_AddFunctionBreakpoint:
{
d_msg(D_MsgKind_AddBreakpoint);
}break;
//- rjf: watch pins
case D_MsgKind_AddWatchPin:
case D_MsgKind_ToggleWatchPin:
{
String8 file_path = regs->file_path;
TxtPt pt = regs->cursor;
String8 string = regs->string;
U64 vaddr = regs->vaddr_range.min;
B32 removed_already_existing = 0;
if(msg->kind == D_MsgKind_ToggleWatchPin)
{
D_EntityList wps = d_query_cached_entity_list_with_kind(D_EntityKind_WatchPin);
for(D_EntityNode *n = wps.first; n != 0; n = n->next)
{
D_Entity *wp = n->entity;
D_Entity *loc = d_entity_child_from_kind(wp, D_EntityKind_Location);
if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) ||
(loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) ||
(!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0)))
{
d_entity_mark_for_deletion(wp);
removed_already_existing = 1;
break;
}
}
}
if(!removed_already_existing)
{
D_Entity *wp = d_entity_alloc(d_entity_root(), D_EntityKind_WatchPin);
d_entity_equip_name(wp, string);
d_entity_equip_cfg_src(wp, D_CfgSrc_Project);
D_Entity *loc = d_entity_alloc(wp, D_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
d_entity_equip_name(loc, file_path);
d_entity_equip_txt_pt(loc, pt);
}
else if(vaddr != 0)
{
d_entity_equip_vaddr(loc, vaddr);
}
}
}break;
//- rjf: watch expressions
case D_MsgKind_ToggleWatchExpression:
if(regs->string.size != 0)
{
D_Entity *existing_watch = d_entity_from_name_and_kind(regs->string, D_EntityKind_Watch);
if(d_entity_is_nil(existing_watch))
{
D_Entity *watch = &d_nil_entity;
D_StateDeltaHistoryBatch(d_state_delta_history())
{
watch = d_entity_alloc(d_entity_root(), D_EntityKind_Watch);
}
d_entity_equip_cfg_src(watch, D_CfgSrc_Project);
d_entity_equip_name(watch, regs->string);
}
else
{
d_entity_mark_for_deletion(existing_watch);
}
}break;
//- rjf: at-cursor operations
case D_MsgKind_ToggleBreakpointAtCursor:{d_msg(D_MsgKind_ToggleBreakpoint);}break;
case D_MsgKind_ToggleWatchPinAtCursor:{d_msg(D_MsgKind_ToggleWatchPin);}break;
case D_MsgKind_GoToNameAtCursor:
case D_MsgKind_ToggleWatchExpressionAtCursor:
{
// rjf: get expr
String8 expr = {0};
{
HS_Scope *hs_scope = hs_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
U128 text_key = regs->text_key;
TXT_LangKind lang_kind = regs->lang_kind;
TxtRng range = txt_rng(regs->cursor, regs->mark);
U128 hash = {0};
TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, text_key, lang_kind, &hash);
String8 data = hs_data_from_hash(hs_scope, hash);
Rng1U64 expr_off_range = {0};
if(range.min.column != range.max.column)
{
expr_off_range = r1u64(txt_off_from_info_pt(&info, range.min), txt_off_from_info_pt(&info, range.max));
}
else
{
expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min);
}
expr = push_str8_copy(scratch.arena, str8_substr(data, expr_off_range));
txt_scope_close(txt_scope);
hs_scope_close(hs_scope);
}
// rjf: push command for this expr
// TODO(rjf): @msgs
// d_msg(msg->kind == D_MsgKind_GoToNameAtCursor ? D_MsgKind_GoToName :
// msg->kind == D_MsgKind_ToggleWatchExpressionAtCursor ? D_MsgKind_ToggleWatchExpression :
// D_MsgKind_GoToName, .string = expr);
}break;
{}break;
case D_MsgKind_RunToCursor:
{
String8 file_path = regs->file_path;
@@ -7731,100 +7475,6 @@ d_tick(Arena *arena, DI_Scope *di_scope, D_CmdList *cmds, F32 dt)
}
d_msg(D_MsgKind_SetThreadIP, .thread = regs->thread, .vaddr_range = r1u64(new_rip_vaddr, 0));
}break;
//- rjf: targets
case D_MsgKind_AddTarget:
{
D_Entity *entity = d_entity_alloc(d_entity_root(), D_EntityKind_Target);
d_entity_equip_disabled(entity, 1);
d_entity_equip_cfg_src(entity, D_CfgSrc_Project);
D_Entity *exe = d_entity_alloc(entity, D_EntityKind_Executable);
d_entity_equip_name(exe, regs->file_path);
String8 working_dir = str8_chop_last_slash(regs->file_path);
if(working_dir.size != 0)
{
String8 working_dir_path = push_str8f(scratch.arena, "%S/", working_dir);
D_Entity *execution_path = d_entity_alloc(entity, D_EntityKind_WorkingDirectory);
d_entity_equip_name(execution_path, working_dir_path);
}
d_msg(D_MsgKind_SelectTarget, .entity = d_handle_from_entity(entity));
}break;
case D_MsgKind_SelectTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
if(entity->kind == D_EntityKind_Target)
{
D_EntityList all_targets = d_query_cached_entity_list_with_kind(D_EntityKind_Target);
B32 is_selected = !entity->disabled;
for(D_EntityNode *n = all_targets.first; n != 0; n = n->next)
{
D_Entity *target = n->entity;
d_entity_equip_disabled(target, 1);
}
if(!is_selected)
{
d_entity_equip_disabled(entity, 0);
}
}
}break;
case D_MsgKind_RetryEndedProcess:
{
D_Entity *ended_process = d_entity_from_handle(regs->entity);
D_Entity *target = d_entity_from_handle(ended_process->entity_handle);
if(target->kind == D_EntityKind_Target)
{
d_msg(D_MsgKind_LaunchAndRun, .entity = d_handle_from_entity(target));
}
else if(d_entity_is_nil(target))
{
log_user_errorf("The ended process' corresponding target is missing.");
}
else if(d_entity_is_nil(ended_process))
{
log_user_errorf("Invalid ended process.");
}
}break;
//- rjf: meta
case D_MsgKind_RegisterAsJITDebugger:
{
#if OS_WINDOWS
char filename_cstr[MAX_PATH] = {0};
GetModuleFileName(0, filename_cstr, sizeof(filename_cstr));
String8 debugger_binary_path = str8_cstring(filename_cstr);
String8 name8 = str8_lit("Debugger");
String8 data8 = push_str8f(scratch.arena, "%S --jit_pid:%%ld --jit_code:%%ld --jit_addr:0x%%p", debugger_binary_path);
String16 name16 = str16_from_8(scratch.arena, name8);
String16 data16 = str16_from_8(scratch.arena, data8);
B32 likely_not_in_admin_mode = 0;
{
HKEY reg_key = 0;
LSTATUS status = 0;
status = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\", 0, KEY_SET_VALUE, &reg_key);
likely_not_in_admin_mode = (status == ERROR_ACCESS_DENIED);
status = RegSetValueExW(reg_key, (LPCWSTR)name16.str, 0, REG_SZ, (BYTE *)data16.str, data16.size*sizeof(U16)+2);
RegCloseKey(reg_key);
}
{
HKEY reg_key = 0;
LSTATUS status = 0;
status = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\", 0, KEY_SET_VALUE, &reg_key);
likely_not_in_admin_mode = (status == ERROR_ACCESS_DENIED);
status = RegSetValueExW(reg_key, (LPCWSTR)name16.str, 0, REG_SZ, (BYTE *)data16.str, data16.size*sizeof(U16)+2);
RegCloseKey(reg_key);
}
if(likely_not_in_admin_mode)
{
log_user_errorf("Could not register as the just-in-time debugger, access was denied; try running the debugger as administrator.");
}
#else
log_user_errorf("Registering as the just-in-time debugger is currently not supported on this system.");
#endif
}break;
case D_MsgKind_LogMarker:
{
log_infof("\"#MARKER\"");
}break;
}
}
}
+2 -68
View File
@@ -37,7 +37,7 @@ Rng1U64 d_reg_slot_range_table[29] =
{OffsetOf(D_Regs, params_tree), OffsetOf(D_Regs, params_tree) + sizeof(MD_Node *)},
};
String8 d_msg_kind_name_lower_table[69] =
String8 d_msg_kind_name_lower_table[36] =
{
str8_lit_comp("null"),
str8_lit_comp("launch_and_run"),
@@ -73,44 +73,11 @@ str8_lit_comp("freeze_machine"),
str8_lit_comp("thaw_machine"),
str8_lit_comp("freeze_local_machine"),
str8_lit_comp("thaw_local_machine"),
str8_lit_comp("set_path_map_src"),
str8_lit_comp("set_path_map_dst"),
str8_lit_comp("set_file_replacement_path"),
str8_lit_comp("set_auto_view_rule_type"),
str8_lit_comp("set_auto_view_rule_view_rule"),
str8_lit_comp("enable_entity"),
str8_lit_comp("enable_breakpoint"),
str8_lit_comp("enable_target"),
str8_lit_comp("disable_entity"),
str8_lit_comp("disable_breakpoint"),
str8_lit_comp("disable_target"),
str8_lit_comp("remove_entity"),
str8_lit_comp("remove_breakpoint"),
str8_lit_comp("remove_target"),
str8_lit_comp("name_entity"),
str8_lit_comp("duplicate_entity"),
str8_lit_comp("relocate_entity"),
str8_lit_comp("add_breakpoint"),
str8_lit_comp("toggle_breakpoint"),
str8_lit_comp("add_address_breakpoint"),
str8_lit_comp("add_function_breakpoint"),
str8_lit_comp("add_watch_pin"),
str8_lit_comp("toggle_watch_pin"),
str8_lit_comp("toggle_watch_expression"),
str8_lit_comp("toggle_breakpoint_at_cursor"),
str8_lit_comp("toggle_watch_pin_at_cursor"),
str8_lit_comp("toggle_watch_expression_at_cursor"),
str8_lit_comp("go_to_name_at_cursor"),
str8_lit_comp("run_to_cursor"),
str8_lit_comp("set_next_statement"),
str8_lit_comp("add_target"),
str8_lit_comp("select_target"),
str8_lit_comp("retry_ended_process"),
str8_lit_comp("register_as_jit_debugger"),
str8_lit_comp("log_marker"),
};
String8 d_msg_kind_name_display_table[69] =
String8 d_msg_kind_name_display_table[36] =
{
str8_lit_comp("null"),
str8_lit_comp("launch_and_run"),
@@ -146,41 +113,8 @@ str8_lit_comp("freeze_machine"),
str8_lit_comp("thaw_machine"),
str8_lit_comp("freeze_local_machine"),
str8_lit_comp("thaw_local_machine"),
str8_lit_comp("set_path_map_src"),
str8_lit_comp("set_path_map_dst"),
str8_lit_comp("set_file_replacement_path"),
str8_lit_comp("set_auto_view_rule_type"),
str8_lit_comp("set_auto_view_rule_view_rule"),
str8_lit_comp("enable_entity"),
str8_lit_comp("enable_breakpoint"),
str8_lit_comp("enable_target"),
str8_lit_comp("disable_entity"),
str8_lit_comp("disable_breakpoint"),
str8_lit_comp("disable_target"),
str8_lit_comp("remove_entity"),
str8_lit_comp("remove_breakpoint"),
str8_lit_comp("remove_target"),
str8_lit_comp("name_entity"),
str8_lit_comp("duplicate_entity"),
str8_lit_comp("relocate_entity"),
str8_lit_comp("add_breakpoint"),
str8_lit_comp("toggle_breakpoint"),
str8_lit_comp("add_address_breakpoint"),
str8_lit_comp("add_function_breakpoint"),
str8_lit_comp("add_watch_pin"),
str8_lit_comp("toggle_watch_pin"),
str8_lit_comp("toggle_watch_expression"),
str8_lit_comp("toggle_breakpoint_at_cursor"),
str8_lit_comp("toggle_watch_pin_at_cursor"),
str8_lit_comp("toggle_watch_expression_at_cursor"),
str8_lit_comp("go_to_name_at_cursor"),
str8_lit_comp("run_to_cursor"),
str8_lit_comp("set_next_statement"),
str8_lit_comp("add_target"),
str8_lit_comp("select_target"),
str8_lit_comp("retry_ended_process"),
str8_lit_comp("register_as_jit_debugger"),
str8_lit_comp("log_marker"),
};
Rng1U64 d_cmd_param_slot_range_table[24] =
+2 -35
View File
@@ -76,41 +76,8 @@ D_MsgKind_FreezeMachine,
D_MsgKind_ThawMachine,
D_MsgKind_FreezeLocalMachine,
D_MsgKind_ThawLocalMachine,
D_MsgKind_SetPathMapSrc,
D_MsgKind_SetPathMapDst,
D_MsgKind_SetFileReplacementPath,
D_MsgKind_SetAutoViewRuleType,
D_MsgKind_SetAutoViewRuleViewRule,
D_MsgKind_EnableEntity,
D_MsgKind_EnableBreakpoint,
D_MsgKind_EnableTarget,
D_MsgKind_DisableEntity,
D_MsgKind_DisableBreakpoint,
D_MsgKind_DisableTarget,
D_MsgKind_RemoveEntity,
D_MsgKind_RemoveBreakpoint,
D_MsgKind_RemoveTarget,
D_MsgKind_NameEntity,
D_MsgKind_DuplicateEntity,
D_MsgKind_RelocateEntity,
D_MsgKind_AddBreakpoint,
D_MsgKind_ToggleBreakpoint,
D_MsgKind_AddAddressBreakpoint,
D_MsgKind_AddFunctionBreakpoint,
D_MsgKind_AddWatchPin,
D_MsgKind_ToggleWatchPin,
D_MsgKind_ToggleWatchExpression,
D_MsgKind_ToggleBreakpointAtCursor,
D_MsgKind_ToggleWatchPinAtCursor,
D_MsgKind_ToggleWatchExpressionAtCursor,
D_MsgKind_GoToNameAtCursor,
D_MsgKind_RunToCursor,
D_MsgKind_SetNextStatement,
D_MsgKind_AddTarget,
D_MsgKind_SelectTarget,
D_MsgKind_RetryEndedProcess,
D_MsgKind_RegisterAsJITDebugger,
D_MsgKind_LogMarker,
D_MsgKind_COUNT,
} D_MsgKind;
@@ -568,8 +535,8 @@ struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =
};
C_LINKAGE_BEGIN
extern Rng1U64 d_reg_slot_range_table[29];
extern String8 d_msg_kind_name_lower_table[69];
extern String8 d_msg_kind_name_display_table[69];
extern String8 d_msg_kind_name_lower_table[36];
extern String8 d_msg_kind_name_display_table[36];
extern Rng1U64 d_cmd_param_slot_range_table[24];
extern String8 d_entity_kind_display_string_table[28];
extern String8 d_entity_kind_name_lower_table[28];
+147 -108
View File
@@ -4,162 +4,201 @@
////////////////////////////////
//~ rjf: Message Tables
@table(name name_lower show_in_ui show_in_ipc_docs q_slot q_ent_kind q_allow_files q_allow_folders q_keep_oi q_select_oi q_is_code q_required canonical_icon desc)
@table(name name_display name_lower show_in_ui show_in_ipc_docs q_slot q_ent_kind q_allow_files q_allow_folders q_keep_oi q_select_oi q_is_code q_required canonical_icon desc)
DF_MsgKindTable:
{
{Null null 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Null "" null 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: meta
{Exit exit 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RunCommand run_command 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleDevMenu toggle_dev_menu 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Exit "" exit 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RunCommand "" run_command 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleDevMenu "" toggle_dev_menu 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RegisterAsJITDebugger "Register As JIT Debugger" register_as_jit_debugger 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{LogMarker "Log Marker" log_marker 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: config reading/writing
{LoadUser load_user_data 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{LoadProject load_project_data 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SaveUser save_user_data 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SaveProject save_project_data 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{LoadUser "" load_user 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{LoadProject "" load_project 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SaveUser "" save_user 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SaveProject "" save_project 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: general config tree mutations
{EnableEntity "Enable Entity" enable_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{EnableBreakpoint "Enable Breakpoint" enable_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{EnableTarget "Enable Target" enable_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableEntity "Disable Entity" disable_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableBreakpoint "Disable Breakpoint" disable_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DisableTarget "Disable Target" disable_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveEntity "Remove Entity" remove_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveBreakpoint "Remove Breakpoint" remove_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RemoveTarget "Remove Target" remove_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NameEntity "Name Entity" name_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DuplicateEntity "Duplicate Entity" duplicate_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RelocateEntity "Relocate Entity" relocate_entity 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: targets
{AddTarget "Add Target" add_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SelectTarget "Select Target" select_target 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: breakpoints
{AddBreakpoint "Add Breakpoint" add_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleBreakpoint "Toggle Breakpoint" toggle_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{AddAddressBreakpoint "Add Address Breakpoint" add_address_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{AddFunctionBreakpoint "Add Function Breakpoint" add_function_breakpoint 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: watch pins
{AddWatchPin "Add Watch Pin" add_watch_pin 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchPin "Toggle Watch Pin" toggle_watch_pin 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: watch expressions
{ToggleWatchExpression "Toggle Watch Expression" toggle_watch_expression 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: at-cursor operations
{GoToNameAtCursor "Go To Name At Cursor" go_to_name_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleBreakpointAtCursor "Toggle Breakpoint At Cursor" toggle_breakpoint_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchPinAtCursor "Toggle Watch Pin At Cursor" toggle_watch_pin_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleWatchExpressionAtCursor "Toggle Watch Expression At Cursor" toggle_watch_expression_at_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: windows
{OpenWindow open_window 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CloseWindow close_window 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleFullscreen toggle_fullscreen 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{OpenWindow "" open_window 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CloseWindow "" close_window 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ToggleFullscreen "" toggle_fullscreen 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: confirmation
{ConfirmAccept confirm_accept 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ConfirmCancel confirm_cancel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ConfirmAccept "" confirm_accept 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ConfirmCancel "" confirm_cancel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: queries
{CompleteQuery complete_query 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CancelQuery cancel_query 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CompleteQuery "" complete_query 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CancelQuery "" cancel_query 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: searching
{FindTextForward find_text_forward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindTextBackward find_text_backward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindNext find_next 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindPrev find_prev 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindTextForward "" find_text_forward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindTextBackward "" find_text_backward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindNext "" find_next 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindPrev "" find_prev 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: font sizes
{IncUIFontScale inc_ui_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DecUIFontScale dec_ui_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{IncCodeFontScale inc_code_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DecCodeFontScale dec_code_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{IncUIFontScale "" inc_ui_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DecUIFontScale "" dec_ui_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{IncCodeFontScale "" inc_code_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DecCodeFontScale "" dec_code_font_scale 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: panel creation/removal
{NewPanelLeft new_panel_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelUp new_panel_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelRight new_panel_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelDown new_panel_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SplitPanel split_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ClosePanel close_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelLeft "" new_panel_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelUp "" new_panel_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelRight "" new_panel_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NewPanelDown "" new_panel_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SplitPanel "" split_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ClosePanel "" close_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: panel rearranging
{RotatePanelColumns rotate_panel_columns 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{RotatePanelColumns "" rotate_panel_columns 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: panel focusing
{NextPanel next_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{PrevPanel prev_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanel focus_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelRight focus_panel_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelLeft focus_panel_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelUp focus_panel_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelDown focus_panel_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NextPanel "" next_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{PrevPanel "" prev_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanel "" focus_panel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelRight "" focus_panel_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelLeft "" focus_panel_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelUp "" focus_panel_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FocusPanelDown "" focus_panel_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: view history navigation
{GoBack go_back 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoForward go_forward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoBack "" go_back 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoForward "" go_forward 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: tab selection
{NextTab next_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{PrevTab prev_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{NextTab "" next_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{PrevTab "" prev_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: tab rearranging
{MoveTabRight move_tab_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveTabLeft move_tab_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveTab move_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveTabRight "" move_tab_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveTabLeft "" move_tab_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveTab "" move_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: tab creation/removal
{OpenTab open_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CloseTab close_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{OpenTab "" open_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CloseTab "" close_tab 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: panel tab settings
{TabBarTop tab_bar_top 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{TabBarBottom tab_bar_bottom 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{TabBarTop "" tab_bar_top 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{TabBarBottom "" tab_bar_bottom 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: tab filters
{Filter filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ClearFilter clear_filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ApplyFilter apply_filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Filter "" filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ClearFilter "" clear_filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ApplyFilter "" apply_filter 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: default panel layouts
{ResetToDefaultPanels reset_to_default_panels 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ResetToCompactPanels reset_to_compact_panels 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ResetToDefaultPanels "" reset_to_default_panels 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ResetToCompactPanels "" reset_to_compact_panels 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: filesystem fast paths
{Open open 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Switch switch 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SwitchToPartnerFile switch_to_partner_file 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Open "" open 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Switch "" switch 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SwitchToPartnerFile "" switch_to_partner_file 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: snapping to code locations
{FindThread find_thread 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindSelectedThread find_selected_thread 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToName go_to_name 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindCodeLocation find_code_location 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindThread "" find_thread 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindSelectedThread "" find_selected_thread 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToName "" go_to_name 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{FindCodeLocation "" find_code_location 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: view messages
{GoToLine go_to_line 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToAddress go_to_address 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CenterCursor center_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ContainCursor contain_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToLine "" go_to_line 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{GoToAddress "" go_to_address 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{CenterCursor "" center_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{ContainCursor "" contain_cursor 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: meta controls
{Edit edit 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Accept accept 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Cancel cancel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Edit "" edit 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Accept "" accept 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Cancel "" cancel 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: directional movement & text controls
{MoveLeft move_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRight move_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUp move_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDown move_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftSelect move_left_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightSelect move_right_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpSelect move_up_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownSelect move_down_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftChunk move_left_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightChunk move_right_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpChunk move_up_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownChunk move_down_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpPage move_up_page 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownPage move_down_page 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpWhole move_up_whole 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownWhole move_down_whole 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftChunkSelect move_left_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightChunkSelect move_right_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpChunkSelect move_up_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownChunkSelect move_down_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpPageSelect move_up_page_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownPageSelect move_down_page_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpWholeSelect move_up_whole_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownWholeSelect move_down_whole_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpReorder move_up_reorder 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownReorder move_down_reorder 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveHome move_home 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveEnd move_end 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveHomeSelect move_home_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveEndSelect move_end_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SelectAll select_all 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DeleteSingle delete_single 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DeleteChunk delete_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{BackspaceSingle backspace_single 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{BackspaceChunk backspace_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Copy copy 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Cut cut 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Paste paste 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{InsertText insert_text 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeft "" move_left 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRight "" move_right 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUp "" move_up 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDown "" move_down 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftSelect "" move_left_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightSelect "" move_right_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpSelect "" move_up_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownSelect "" move_down_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftChunk "" move_left_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightChunk "" move_right_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpChunk "" move_up_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownChunk "" move_down_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpPage "" move_up_page 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownPage "" move_down_page 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpWhole "" move_up_whole 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownWhole "" move_down_whole 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveLeftChunkSelect "" move_left_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveRightChunkSelect "" move_right_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpChunkSelect "" move_up_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownChunkSelect "" move_down_chunk_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpPageSelect "" move_up_page_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownPageSelect "" move_down_page_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpWholeSelect "" move_up_whole_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownWholeSelect "" move_down_whole_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveUpReorder "" move_up_reorder 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveDownReorder "" move_down_reorder 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveHome "" move_home 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveEnd "" move_end 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveHomeSelect "" move_home_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{MoveEndSelect "" move_end_select 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{SelectAll "" select_all 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DeleteSingle "" delete_single 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{DeleteChunk "" delete_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{BackspaceSingle "" backspace_single 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{BackspaceChunk "" backspace_chunk 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Copy "" copy 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Cut "" cut 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{Paste "" paste 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{InsertText "" insert_text 0 0 Null Nil 0 0 0 0 0 0 Null ""}
//- rjf: os event passthrough
{OSEvent os_event 0 0 Null Nil 0 0 0 0 0 0 Null ""}
{OSEvent "" os_event 0 0 Null Nil 0 0 0 0 0 0 Null ""}
}
@enum DF_MsgKind:
+513 -3
View File
@@ -2082,12 +2082,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, D_CmdList *cmds)
{
if(ws->code_ctx_menu_file_path.size != 0)
{
d_cmd(D_CmdKind_RunToLine, .file_path = ws->code_ctx_menu_file_path, .text_point = range.min);
d_msg(D_MsgKind_RunToLine, .file_path = ws->code_ctx_menu_file_path, .cursor = range.min);
}
else
{
d_cmd(D_CmdKind_RunToAddress, .vaddr = ws->code_ctx_menu_vaddr);
d_msg(D_MsgKind_RunToAddress, .vaddr_range = r1u64(ws->code_ctx_menu_vaddr, ws->code_ctx_menu_vaddr));
}
ui_ctx_menu_close();
@@ -2107,7 +2105,6 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, D_CmdList *cmds)
expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min);
}
String8 expr = str8_substr(data, expr_off_range);
d_cmd(D_CmdKind_GoToName, .string = expr);
df_msg(DF_MsgKind_GoToName, .string = expr);
ui_ctx_menu_close();
}
@@ -7073,6 +7070,176 @@ df_push_search_string(Arena *arena)
////////////////////////////////
//~ rjf: Colors, Fonts, Config
//- rjf: string <-> cfg tree
internal MD_Node *
df_cfg_tree_from_string(String8 string)
{
MD_Node *result = &md_nil_node;
Temp scratch = scratch_begin(0, 0);
{
MD_Node *lookup_tree = md_tree_from_string(scratch.arena, string);
MD_Node *lookup_root = &md_nil_node;
for(MD_EachNode(op, lookup_tree->first))
{
// rjf: user -> look into user subtree
if(op == lookup_tree->first && str8_match(op->string, str8_lit("user"), StringMatchFlag_CaseInsensitive))
{
lookup_root = df_state->cfg_slot_roots[DF_CfgSlot_User];
}
// rjf: project -> look into project subtree
else if(op == lookup_tree->first && str8_match(op->string, str8_lit("project"), StringMatchFlag_CaseInsensitive))
{
lookup_root = df_state->cfg_slot_roots[DF_CfgSlot_Project];
}
// rjf: skip cases
else if(op->flags & MD_NodeFlag_Symbol && str8_match(op->string, str8_lit("."), 0))
{
continue;
}
// rjf: look up `.name` or `.name[idx]` or `.name:"label"`
else if(op->flags & MD_NodeFlag_Symbol && str8_match(op->string, str8_lit("."), 0) &&
op->next->flags & MD_NodeFlag_Identifier)
{
String8 label_target = {0};
if(op->next->first->flags & MD_NodeFlag_StringDoubleQuote)
{
label_target = op->next->first->string;
}
U64 idx_target = 0;
if(op->next->next->flags & MD_NodeFlag_HasBracketLeft &&
op->next->next->flags & MD_NodeFlag_HasBracketRight &&
op->next->next->first->flags & MD_NodeFlag_Numeric &&
op->next->next->first == op->next->last)
{
String8 idx_string = md_string_from_children(scratch.arena, op->next->next);
E_Eval idx_eval = e_eval_from_string(scratch.arena, idx_string);
E_Eval idx_eval_value = e_value_eval_from_eval(idx_eval);
idx_target = idx_eval_value.value.u64;
}
U64 idx_search = 0;
for(MD_EachNode(tln, lookup_root->first))
{
if(str8_match(tln->string, op->next->string, 0))
{
B32 label_target_matches = 1;
if(label_target.size != 0)
{
MD_Node *label_child = md_child_from_string(tln, str8_lit("label"), 0);
label_target_matches = str8_match(label_target, label_child->first->string, 0);
}
lookup_root = tln;
if(idx_target == idx_search)
{
break;
}
idx_search += 1;
}
}
}
}
result = lookup_root;
}
scratch_end(scratch);
return result;
}
internal String8
df_string_from_cfg_tree(Arena *arena, MD_Node *node)
{
Temp scratch = scratch_begin(&arena, 1);
String8List strings = {0};
for(MD_Node *n = node; !md_node_is_nil(n); n = n->parent)
{
if(n == df_state->cfg_slot_roots[DF_CfgSlot_User])
{
str8_list_push_front(scratch.arena, &strings, str8_lit("user"));
break;
}
else if(n == df_state->cfg_slot_roots[DF_CfgSlot_Project])
{
str8_list_push_front(scratch.arena, &strings, str8_lit("project"));
break;
}
U64 index = 0;
for(MD_Node *n2 = n->prev; !md_node_is_nil(n2); n2 = n2->prev)
{
if(str8_match(n2->string, n->string, 0))
{
index += 1;
}
}
str8_list_push_frontf(scratch.arena, &strings, ".%S[%I64u]", n->string, index);
}
String8 result = str8_list_join(arena, &strings, 0);
scratch_end(scratch);
return result;
}
//- rjf: config tree mutations
internal DF_CfgSlot
df_cfg_slot_from_tree(MD_Node *node)
{
DF_CfgSlot slot = DF_CfgSlot_User;
for(MD_Node *n = node; !md_node_is_nil(n); n = n->parent)
{
for(EachEnumVal(DF_CfgSlot, s))
{
if(n == df_state->cfg_slot_roots[s])
{
slot = s;
goto end;
}
}
}
end:;
return slot;
}
internal MD_Node *
df_cfg_tree_store(MD_Node *parent, MD_Node *replace_node, String8 string)
{
DF_CfgSlot slot = df_cfg_slot_from_tree(parent);
Arena *arena = df_state->cfg_slot_arenas[slot];
MD_Node *new_root = &md_nil_node;
if(string.size != 0)
{
String8 string_copy = push_str8_copy(arena, string);
new_root = md_tree_from_string(arena, string_copy);
}
MD_Node *result = &md_nil_node;
result = new_root->first;
MD_Node *prev_child = parent->last;
if(!md_node_is_nil(replace_node))
{
prev_child = replace_node->prev;
md_node_remove_child(replace_node->parent, replace_node);
}
for(MD_EachNode(child, new_root->first))
{
md_node_insert_child(parent, prev_child, child);
prev_child = child;
}
return result;
}
internal MD_Node *
df_cfg_tree_storef(MD_Node *parent, MD_Node *replace_node, char *fmt, ...)
{
Temp scratch = scratch_begin(0, 0);
va_list args;
va_start(args, fmt);
String8 string = push_str8fv(scratch.arena, fmt, args);
MD_Node *result = df_cfg_tree_store(parent, replace_node, string);
va_end(args);
scratch_end(scratch);
return result;
}
//- rjf: keybindings
internal void
@@ -8502,6 +8669,45 @@ df_frame(void)
DF_Window *window = df_window_from_handle(regs->window);
window->dev_menu_is_open ^= 1;
}break;
case DF_MsgKind_RegisterAsJITDebugger:
{
#if OS_WINDOWS
char filename_cstr[MAX_PATH] = {0};
GetModuleFileName(0, filename_cstr, sizeof(filename_cstr));
String8 debugger_binary_path = str8_cstring(filename_cstr);
String8 name8 = str8_lit("Debugger");
String8 data8 = push_str8f(scratch.arena, "%S --jit_pid:%%ld --jit_code:%%ld --jit_addr:0x%%p", debugger_binary_path);
String16 name16 = str16_from_8(scratch.arena, name8);
String16 data16 = str16_from_8(scratch.arena, data8);
B32 likely_not_in_admin_mode = 0;
{
HKEY reg_key = 0;
LSTATUS status = 0;
status = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\", 0, KEY_SET_VALUE, &reg_key);
likely_not_in_admin_mode = (status == ERROR_ACCESS_DENIED);
status = RegSetValueExW(reg_key, (LPCWSTR)name16.str, 0, REG_SZ, (BYTE *)data16.str, data16.size*sizeof(U16)+2);
RegCloseKey(reg_key);
}
{
HKEY reg_key = 0;
LSTATUS status = 0;
status = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\", 0, KEY_SET_VALUE, &reg_key);
likely_not_in_admin_mode = (status == ERROR_ACCESS_DENIED);
status = RegSetValueExW(reg_key, (LPCWSTR)name16.str, 0, REG_SZ, (BYTE *)data16.str, data16.size*sizeof(U16)+2);
RegCloseKey(reg_key);
}
if(likely_not_in_admin_mode)
{
log_user_errorf("Could not register as the just-in-time debugger, access was denied; try running the debugger as administrator.");
}
#else
log_user_errorf("Registering as the just-in-time debugger is currently not supported on this system.");
#endif
}break;
case DF_MsgKind_LogMarker:
{
log_infof("\"#MARKER\"");
}break;
//- rjf: config loading/saving
case DF_MsgKind_LoadUser: cfg_slot = DF_CfgSlot_User; goto load_cfg_data;
@@ -8526,6 +8732,310 @@ df_frame(void)
// TODO(rjf): @msgs
}break;
//- rjf: general entity operations
case DF_MsgKind_EnableEntity:
case DF_MsgKind_EnableBreakpoint:
case DF_MsgKind_EnableTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
d_entity_equip_disabled(entity, 0);
}break;
case DF_MsgKind_DisableEntity:
case DF_MsgKind_DisableBreakpoint:
case DF_MsgKind_DisableTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
d_entity_equip_disabled(entity, 1);
}break;
case DF_MsgKind_RemoveEntity:
case DF_MsgKind_RemoveBreakpoint:
case DF_MsgKind_RemoveTarget:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
D_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind];
if(kind_flags & D_EntityKindFlag_CanDelete)
{
d_entity_mark_for_deletion(entity);
}
}break;
case DF_MsgKind_NameEntity:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
String8 string = regs->string;
d_entity_equip_name(entity, string);
}break;
case DF_MsgKind_DuplicateEntity:
{
D_Entity *src = d_entity_from_handle(regs->entity);
if(!d_entity_is_nil(src))
{
typedef struct Task Task;
struct Task
{
Task *next;
D_Entity *src_n;
D_Entity *dst_parent;
};
Task starter_task = {0, src, src->parent};
Task *first_task = &starter_task;
Task *last_task = &starter_task;
for(Task *task = first_task; task != 0; task = task->next)
{
D_Entity *src_n = task->src_n;
D_Entity *dst_n = d_entity_alloc(task->dst_parent, task->src_n->kind);
if(src_n->flags & D_EntityFlag_HasTextPoint) {d_entity_equip_txt_pt(dst_n, src_n->text_point);}
if(src_n->flags & D_EntityFlag_HasU64) {d_entity_equip_u64(dst_n, src_n->u64);}
if(src_n->flags & D_EntityFlag_HasColor) {d_entity_equip_color_hsva(dst_n, d_hsva_from_entity(src_n));}
if(src_n->flags & D_EntityFlag_HasVAddrRng) {d_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);}
if(src_n->flags & D_EntityFlag_HasVAddr) {d_entity_equip_vaddr(dst_n, src_n->vaddr);}
if(src_n->disabled) {d_entity_equip_disabled(dst_n, 1);}
if(src_n->string.size != 0) {d_entity_equip_name(dst_n, src_n->string);}
dst_n->cfg_src = src_n->cfg_src;
for(D_Entity *src_child = task->src_n->first; !d_entity_is_nil(src_child); src_child = src_child->next)
{
Task *child_task = push_array(scratch.arena, Task, 1);
child_task->src_n = src_child;
child_task->dst_parent = dst_n;
SLLQueuePush(first_task, last_task, child_task);
}
}
}
}break;
case DF_MsgKind_RelocateEntity:
{
D_Entity *entity = d_entity_from_handle(regs->entity);
D_Entity *location = d_entity_child_from_kind(entity, D_EntityKind_Location);
if(d_entity_is_nil(location))
{
location = d_entity_alloc(entity, D_EntityKind_Location);
}
location->flags &= ~D_EntityFlag_HasTextPoint;
location->flags &= ~D_EntityFlag_HasVAddr;
if(regs->cursor.line != 0)
{
d_entity_equip_txt_pt(location, regs->cursor);
}
if(regs->vaddr_range.min != 0)
{
d_entity_equip_vaddr(location, regs->vaddr_range.min);
}
if(regs->file_path.size != 0)
{
d_entity_equip_name(location, regs->file_path);
}
}break;
//- rjf: breakpoints
case DF_MsgKind_AddBreakpoint:
case DF_MsgKind_ToggleBreakpoint:
{
String8 file_path = regs->file_path;
TxtPt pt = regs->cursor;
String8 string = regs->string;
U64 vaddr = regs->vaddr_range.min;
B32 removed_already_existing = 0;
if(msg->kind == DF_MsgKind_ToggleBreakpoint)
{
D_EntityList bps = d_query_cached_entity_list_with_kind(D_EntityKind_Breakpoint);
for(D_EntityNode *n = bps.first; n != 0; n = n->next)
{
D_Entity *bp = n->entity;
D_Entity *loc = d_entity_child_from_kind(bp, D_EntityKind_Location);
if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) ||
(loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) ||
(!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0)))
{
d_entity_mark_for_deletion(bp);
removed_already_existing = 1;
break;
}
}
}
if(!removed_already_existing)
{
D_Entity *bp = d_entity_alloc(d_entity_root(), D_EntityKind_Breakpoint);
d_entity_equip_cfg_src(bp, D_CfgSrc_Project);
D_Entity *loc = d_entity_alloc(bp, D_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
d_entity_equip_name(loc, file_path);
d_entity_equip_txt_pt(loc, pt);
}
else if(string.size != 0)
{
d_entity_equip_name(loc, string);
}
else if(vaddr != 0)
{
d_entity_equip_vaddr(loc, vaddr);
}
}
}break;
case DF_MsgKind_AddAddressBreakpoint:
case DF_MsgKind_AddFunctionBreakpoint:
{
d_msg(DF_MsgKind_AddBreakpoint);
}break;
//- rjf: watch pins
case DF_MsgKind_AddWatchPin:
case DF_MsgKind_ToggleWatchPin:
{
String8 file_path = regs->file_path;
TxtPt pt = regs->cursor;
String8 string = regs->string;
U64 vaddr = regs->vaddr_range.min;
B32 removed_already_existing = 0;
if(msg->kind == DF_MsgKind_ToggleWatchPin)
{
D_EntityList wps = d_query_cached_entity_list_with_kind(D_EntityKind_WatchPin);
for(D_EntityNode *n = wps.first; n != 0; n = n->next)
{
D_Entity *wp = n->entity;
D_Entity *loc = d_entity_child_from_kind(wp, D_EntityKind_Location);
if((loc->flags & D_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) ||
(loc->flags & D_EntityFlag_HasVAddr && loc->vaddr == vaddr) ||
(!(loc->flags & D_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0)))
{
d_entity_mark_for_deletion(wp);
removed_already_existing = 1;
break;
}
}
}
if(!removed_already_existing)
{
D_Entity *wp = d_entity_alloc(d_entity_root(), D_EntityKind_WatchPin);
d_entity_equip_name(wp, string);
d_entity_equip_cfg_src(wp, D_CfgSrc_Project);
D_Entity *loc = d_entity_alloc(wp, D_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
d_entity_equip_name(loc, file_path);
d_entity_equip_txt_pt(loc, pt);
}
else if(vaddr != 0)
{
d_entity_equip_vaddr(loc, vaddr);
}
}
}break;
//- rjf: watch expressions
case DF_MsgKind_ToggleWatchExpression:
if(regs->string.size != 0)
{
D_Entity *existing_watch = d_entity_from_name_and_kind(regs->string, D_EntityKind_Watch);
if(d_entity_is_nil(existing_watch))
{
D_Entity *watch = &d_nil_entity;
D_StateDeltaHistoryBatch(d_state_delta_history())
{
watch = d_entity_alloc(d_entity_root(), D_EntityKind_Watch);
}
d_entity_equip_cfg_src(watch, D_CfgSrc_Project);
d_entity_equip_name(watch, regs->string);
}
else
{
d_entity_mark_for_deletion(existing_watch);
}
}break;
//- rjf: at-cursor operations
case DF_MsgKind_ToggleBreakpointAtCursor:{d_msg(DF_MsgKind_ToggleBreakpoint);}break;
case DF_MsgKind_ToggleWatchPinAtCursor:{d_msg(DF_MsgKind_ToggleWatchPin);}break;
case DF_MsgKind_GoToNameAtCursor:
case DF_MsgKind_ToggleWatchExpressionAtCursor:
{
// rjf: get expr
String8 expr = {0};
{
HS_Scope *hs_scope = hs_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
U128 text_key = regs->text_key;
TXT_LangKind lang_kind = regs->lang_kind;
TxtRng range = txt_rng(regs->cursor, regs->mark);
U128 hash = {0};
TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, text_key, lang_kind, &hash);
String8 data = hs_data_from_hash(hs_scope, hash);
Rng1U64 expr_off_range = {0};
if(range.min.column != range.max.column)
{
expr_off_range = r1u64(txt_off_from_info_pt(&info, range.min), txt_off_from_info_pt(&info, range.max));
}
else
{
expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min);
}
expr = push_str8_copy(scratch.arena, str8_substr(data, expr_off_range));
txt_scope_close(txt_scope);
hs_scope_close(hs_scope);
}
// rjf: push command for this expr
// TODO(rjf): @msgs
// d_msg(msg->kind == DF_MsgKind_GoToNameAtCursor ? DF_MsgKind_GoToName :
// msg->kind == DF_MsgKind_ToggleWatchExpressionAtCursor ? DF_MsgKind_ToggleWatchExpression :
// DF_MsgKind_GoToName, .string = expr);
}break;
//- rjf: targets
case DF_MsgKind_AddTarget:
{
DF_CfgSlot cfg_slot = DF_CfgSlot_Project;
MD_Node *cfg_root = df_state->cfg_slot_roots[cfg_slot];
String8 cfg_path = cfg_root->string;
String8 cfg_folder = str8_chop_last_slash(cfg_path);
String8 file_path = regs->file_path;
String8 file_path_normalized = path_normalized_from_string(scratch.arena, file_path);
String8 file_path_relative = path_relative_dst_from_absolute_dst_src(scratch.arena, file_path_normalized, cfg_folder);
String8 file_path_escaped = escaped_from_raw_string(scratch.arena, file_path_relative);
String8 working_dir_normalized = str8_chop_last_slash(file_path_normalized);
String8 working_dir_relative = path_relative_dst_from_absolute_dst_src(scratch.arena, working_dir_normalized, cfg_folder);
String8 working_dir_escaped = escaped_from_raw_string(scratch.arena, working_dir_relative);
MD_Node *target_cfg = df_cfg_tree_storef(cfg_root, &md_nil_node,
"target:{executable:\"%S\", working_directory:\"%S\"}",
file_path_escaped,
working_dir_escaped);
df_msg(DF_MsgKind_SelectTarget, .string = df_string_from_cfg_tree(scratch.arena, target_cfg));
}break;
case DF_MsgKind_SelectTarget:
{
MD_Node *target_cfg = df_cfg_tree_from_string(regs->string);
if(!md_node_is_nil(target_cfg))
{
for(MD_EachNode(root_ref, df_state->cfg_root->first))
{
for(MD_EachNode(tln, root_ref->first->first))
{
if(str8_match(target_cfg->string, tln->string, 0))
{
df_cfg_tree_set_keyf(tln, str8_lit("disabled"), "%i", tln == target_cfg);
}
}
}
}
#if 0 // TODO(rjf): @msgs
D_Entity *entity = d_entity_from_handle(regs->entity);
if(entity->kind == D_EntityKind_Target)
{
D_EntityList all_targets = d_query_cached_entity_list_with_kind(D_EntityKind_Target);
B32 is_selected = !entity->disabled;
for(D_EntityNode *n = all_targets.first; n != 0; n = n->next)
{
D_Entity *target = n->entity;
d_entity_equip_disabled(target, 1);
}
if(!is_selected)
{
d_entity_equip_disabled(entity, 0);
}
}
#endif
}break;
//- rjf: windows
case DF_MsgKind_OpenWindow:
{
+12 -1
View File
@@ -549,6 +549,7 @@ struct DF_Window
// rjf: top-level info & handles
Arena *arena;
String8 cfg_string;
OS_Handle os;
R_Handle r;
UI_State *ui;
@@ -662,7 +663,6 @@ struct DF_Window
typedef struct DF_State DF_State;
struct DF_State
{
// rjf: arenas
Arena *arena;
B32 quit;
@@ -977,6 +977,17 @@ internal String8 df_push_search_string(Arena *arena);
////////////////////////////////
//~ rjf: Colors, Fonts, Config
//- rjf: string <-> cfg tree
internal MD_Node *df_cfg_tree_from_string(String8 string);
internal String8 df_string_from_cfg_tree(Arena *arena, MD_Node *node);
//- rjf: config tree mutations
internal DF_CfgSlot df_cfg_slot_from_tree(MD_Node *node);
internal MD_Node *df_cfg_tree_store(MD_Node *parent, MD_Node *replace_node, String8 string);
internal MD_Node *df_cfg_tree_storef(MD_Node *parent, MD_Node *replace_node, char *fmt, ...);
#define df_cfg_tree_set_key(parent, key, val) df_cfg_tree_store((parent), md_child_from_string((parent), (key), 0), (val))
#define df_cfg_tree_set_keyf(parent, key, fmt, ...) df_cfg_tree_storef((parent), md_child_from_string((parent), (key), 0), (fmt), __VA_ARGS__)
//- rjf: keybindings
internal void df_clear_bindings(void);
internal DF_BindingList df_bindings_from_spec(Arena *arena, D_CmdSpec *spec);
+33 -39
View File
@@ -4,16 +4,43 @@
//- GENERATED CODE
C_LINKAGE_BEGIN
DF_MsgKindInfo df_msg_kind_info_table[107] =
DF_MsgKindInfo df_msg_kind_info_table[134] =
{
{str8_lit_comp("null"), str8_lit_comp("Null"), str8_lit_comp(""), str8_lit_comp("Null"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("exit"), str8_lit_comp("Exit"), str8_lit_comp(""), str8_lit_comp("Exit"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("run_command"), str8_lit_comp("RunCommand"), str8_lit_comp(""), str8_lit_comp("RunCommand"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_dev_menu"), str8_lit_comp("ToggleDevMenu"), str8_lit_comp(""), str8_lit_comp("ToggleDevMenu"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("load_user_data"), str8_lit_comp("LoadUser"), str8_lit_comp(""), str8_lit_comp("LoadUser"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("load_project_data"), str8_lit_comp("LoadProject"), str8_lit_comp(""), str8_lit_comp("LoadProject"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("save_user_data"), str8_lit_comp("SaveUser"), str8_lit_comp(""), str8_lit_comp("SaveUser"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("save_project_data"), str8_lit_comp("SaveProject"), str8_lit_comp(""), str8_lit_comp("SaveProject"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("RegisterAsJITDebugger"), str8_lit_comp(""), str8_lit_comp("RegisterAsJITDebugger"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("log_marker"), str8_lit_comp("LogMarker"), str8_lit_comp(""), str8_lit_comp("LogMarker"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("load_user"), str8_lit_comp("LoadUser"), str8_lit_comp(""), str8_lit_comp("LoadUser"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("load_project"), str8_lit_comp("LoadProject"), str8_lit_comp(""), str8_lit_comp("LoadProject"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("save_user"), str8_lit_comp("SaveUser"), str8_lit_comp(""), str8_lit_comp("SaveUser"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("save_project"), str8_lit_comp("SaveProject"), str8_lit_comp(""), str8_lit_comp("SaveProject"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_entity"), str8_lit_comp("EnableEntity"), str8_lit_comp(""), str8_lit_comp("EnableEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_breakpoint"), str8_lit_comp("EnableBreakpoint"), str8_lit_comp(""), str8_lit_comp("EnableBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_target"), str8_lit_comp("EnableTarget"), str8_lit_comp(""), str8_lit_comp("EnableTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_entity"), str8_lit_comp("DisableEntity"), str8_lit_comp(""), str8_lit_comp("DisableEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_breakpoint"), str8_lit_comp("DisableBreakpoint"), str8_lit_comp(""), str8_lit_comp("DisableBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_target"), str8_lit_comp("DisableTarget"), str8_lit_comp(""), str8_lit_comp("DisableTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_entity"), str8_lit_comp("RemoveEntity"), str8_lit_comp(""), str8_lit_comp("RemoveEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_breakpoint"), str8_lit_comp("RemoveBreakpoint"), str8_lit_comp(""), str8_lit_comp("RemoveBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_target"), str8_lit_comp("RemoveTarget"), str8_lit_comp(""), str8_lit_comp("RemoveTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("name_entity"), str8_lit_comp("NameEntity"), str8_lit_comp(""), str8_lit_comp("NameEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("duplicate_entity"), str8_lit_comp("DuplicateEntity"), str8_lit_comp(""), str8_lit_comp("DuplicateEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("relocate_entity"), str8_lit_comp("RelocateEntity"), str8_lit_comp(""), str8_lit_comp("RelocateEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_target"), str8_lit_comp("AddTarget"), str8_lit_comp(""), str8_lit_comp("AddTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("select_target"), str8_lit_comp("SelectTarget"), str8_lit_comp(""), str8_lit_comp("SelectTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_breakpoint"), str8_lit_comp("AddBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_breakpoint"), str8_lit_comp("ToggleBreakpoint"), str8_lit_comp(""), str8_lit_comp("ToggleBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_address_breakpoint"), str8_lit_comp("AddAddressBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddAddressBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_function_breakpoint"), str8_lit_comp("AddFunctionBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddFunctionBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_watch_pin"), str8_lit_comp("AddWatchPin"), str8_lit_comp(""), str8_lit_comp("AddWatchPin"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp("ToggleWatchPin"), str8_lit_comp(""), str8_lit_comp("ToggleWatchPin"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_expression"), str8_lit_comp("ToggleWatchExpression"), str8_lit_comp(""), str8_lit_comp("ToggleWatchExpression"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("go_to_name_at_cursor"), str8_lit_comp("GoToNameAtCursor"), str8_lit_comp(""), str8_lit_comp("GoToNameAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_breakpoint_at_cursor"), str8_lit_comp("ToggleBreakpointAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleBreakpointAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("ToggleWatchPinAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleWatchPinAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_expression_at_cursor"), str8_lit_comp("ToggleWatchExpressionAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleWatchExpressionAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("open_window"), str8_lit_comp("OpenWindow"), str8_lit_comp(""), str8_lit_comp("OpenWindow"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("close_window"), str8_lit_comp("CloseWindow"), str8_lit_comp(""), str8_lit_comp("CloseWindow"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_fullscreen"), str8_lit_comp("ToggleFullscreen"), str8_lit_comp(""), str8_lit_comp("ToggleFullscreen"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
@@ -115,7 +142,7 @@ DF_MsgKindInfo df_msg_kind_info_table[107] =
{str8_lit_comp("os_event"), str8_lit_comp("OSEvent"), str8_lit_comp(""), str8_lit_comp("OSEvent"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
};
DF_MsgKindInfo df_d_msg_kind_info_table[69] =
DF_MsgKindInfo df_d_msg_kind_info_table[36] =
{
{str8_lit_comp("null"), str8_lit_comp("Null"), str8_lit_comp(""), str8_lit_comp("Null"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("launch_and_run"), str8_lit_comp("LaunchAndRun"), str8_lit_comp(""), str8_lit_comp("LaunchAndRun"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
@@ -151,41 +178,8 @@ DF_MsgKindInfo df_d_msg_kind_info_table[69] =
{str8_lit_comp("thaw_machine"), str8_lit_comp("ThawMachine"), str8_lit_comp(""), str8_lit_comp("ThawMachine"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("freeze_local_machine"), str8_lit_comp("FreezeLocalMachine"), str8_lit_comp(""), str8_lit_comp("FreezeLocalMachine"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("thaw_local_machine"), str8_lit_comp("ThawLocalMachine"), str8_lit_comp(""), str8_lit_comp("ThawLocalMachine"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_path_map_src"), str8_lit_comp("SetPathMapSrc"), str8_lit_comp(""), str8_lit_comp("SetPathMapSrc"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_path_map_dst"), str8_lit_comp("SetPathMapDst"), str8_lit_comp(""), str8_lit_comp("SetPathMapDst"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_file_replacement_path"), str8_lit_comp("SetFileReplacementPath"), str8_lit_comp(""), str8_lit_comp("SetFileReplacementPath"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_auto_view_rule_type"), str8_lit_comp("SetAutoViewRuleType"), str8_lit_comp(""), str8_lit_comp("SetAutoViewRuleType"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_auto_view_rule_view_rule"), str8_lit_comp("SetAutoViewRuleViewRule"), str8_lit_comp(""), str8_lit_comp("SetAutoViewRuleViewRule"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_entity"), str8_lit_comp("EnableEntity"), str8_lit_comp(""), str8_lit_comp("EnableEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_breakpoint"), str8_lit_comp("EnableBreakpoint"), str8_lit_comp(""), str8_lit_comp("EnableBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("enable_target"), str8_lit_comp("EnableTarget"), str8_lit_comp(""), str8_lit_comp("EnableTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_entity"), str8_lit_comp("DisableEntity"), str8_lit_comp(""), str8_lit_comp("DisableEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_breakpoint"), str8_lit_comp("DisableBreakpoint"), str8_lit_comp(""), str8_lit_comp("DisableBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("disable_target"), str8_lit_comp("DisableTarget"), str8_lit_comp(""), str8_lit_comp("DisableTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_entity"), str8_lit_comp("RemoveEntity"), str8_lit_comp(""), str8_lit_comp("RemoveEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_breakpoint"), str8_lit_comp("RemoveBreakpoint"), str8_lit_comp(""), str8_lit_comp("RemoveBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("remove_target"), str8_lit_comp("RemoveTarget"), str8_lit_comp(""), str8_lit_comp("RemoveTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("name_entity"), str8_lit_comp("NameEntity"), str8_lit_comp(""), str8_lit_comp("NameEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("duplicate_entity"), str8_lit_comp("DuplicateEntity"), str8_lit_comp(""), str8_lit_comp("DuplicateEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("relocate_entity"), str8_lit_comp("RelocateEntity"), str8_lit_comp(""), str8_lit_comp("RelocateEntity"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_breakpoint"), str8_lit_comp("AddBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_breakpoint"), str8_lit_comp("ToggleBreakpoint"), str8_lit_comp(""), str8_lit_comp("ToggleBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_address_breakpoint"), str8_lit_comp("AddAddressBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddAddressBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_function_breakpoint"), str8_lit_comp("AddFunctionBreakpoint"), str8_lit_comp(""), str8_lit_comp("AddFunctionBreakpoint"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_watch_pin"), str8_lit_comp("AddWatchPin"), str8_lit_comp(""), str8_lit_comp("AddWatchPin"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp("ToggleWatchPin"), str8_lit_comp(""), str8_lit_comp("ToggleWatchPin"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_expression"), str8_lit_comp("ToggleWatchExpression"), str8_lit_comp(""), str8_lit_comp("ToggleWatchExpression"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_breakpoint_at_cursor"), str8_lit_comp("ToggleBreakpointAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleBreakpointAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("ToggleWatchPinAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleWatchPinAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("toggle_watch_expression_at_cursor"), str8_lit_comp("ToggleWatchExpressionAtCursor"), str8_lit_comp(""), str8_lit_comp("ToggleWatchExpressionAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("go_to_name_at_cursor"), str8_lit_comp("GoToNameAtCursor"), str8_lit_comp(""), str8_lit_comp("GoToNameAtCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("run_to_cursor"), str8_lit_comp("RunToCursor"), str8_lit_comp(""), str8_lit_comp("RunToCursor"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("set_next_statement"), str8_lit_comp("SetNextStatement"), str8_lit_comp(""), str8_lit_comp("SetNextStatement"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("add_target"), str8_lit_comp("AddTarget"), str8_lit_comp(""), str8_lit_comp("AddTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("select_target"), str8_lit_comp("SelectTarget"), str8_lit_comp(""), str8_lit_comp("SelectTarget"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("retry_ended_process"), str8_lit_comp("RetryEndedProcess"), str8_lit_comp(""), str8_lit_comp("RetryEndedProcess"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("RegisterAsJITDebugger"), str8_lit_comp(""), str8_lit_comp("RegisterAsJITDebugger"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
{str8_lit_comp("log_marker"), str8_lit_comp("LogMarker"), str8_lit_comp(""), str8_lit_comp("LogMarker"), ((0*DF_MsgKindFlag_ListInUI)|(0*DF_MsgKindFlag_ListInIPCDocs)), {(0*DF_MsgQueryFlag_AllowFiles)|(0*DF_MsgQueryFlag_AllowFolders)|(0*DF_MsgQueryFlag_KeepOldInput)|(0*DF_MsgQueryFlag_SelectOldInput)|(0*DF_MsgQueryFlag_CodeInput)|(0*DF_MsgQueryFlag_Required), D_RegSlot_Null, D_EntityKind_Nil}},
};
DF_StringBindingPair df_g_default_binding_table[110] =
+29 -2
View File
@@ -12,10 +12,37 @@ DF_MsgKind_Null,
DF_MsgKind_Exit,
DF_MsgKind_RunCommand,
DF_MsgKind_ToggleDevMenu,
DF_MsgKind_RegisterAsJITDebugger,
DF_MsgKind_LogMarker,
DF_MsgKind_LoadUser,
DF_MsgKind_LoadProject,
DF_MsgKind_SaveUser,
DF_MsgKind_SaveProject,
DF_MsgKind_EnableEntity,
DF_MsgKind_EnableBreakpoint,
DF_MsgKind_EnableTarget,
DF_MsgKind_DisableEntity,
DF_MsgKind_DisableBreakpoint,
DF_MsgKind_DisableTarget,
DF_MsgKind_RemoveEntity,
DF_MsgKind_RemoveBreakpoint,
DF_MsgKind_RemoveTarget,
DF_MsgKind_NameEntity,
DF_MsgKind_DuplicateEntity,
DF_MsgKind_RelocateEntity,
DF_MsgKind_AddTarget,
DF_MsgKind_SelectTarget,
DF_MsgKind_AddBreakpoint,
DF_MsgKind_ToggleBreakpoint,
DF_MsgKind_AddAddressBreakpoint,
DF_MsgKind_AddFunctionBreakpoint,
DF_MsgKind_AddWatchPin,
DF_MsgKind_ToggleWatchPin,
DF_MsgKind_ToggleWatchExpression,
DF_MsgKind_GoToNameAtCursor,
DF_MsgKind_ToggleBreakpointAtCursor,
DF_MsgKind_ToggleWatchPinAtCursor,
DF_MsgKind_ToggleWatchExpressionAtCursor,
DF_MsgKind_OpenWindow,
DF_MsgKind_CloseWindow,
DF_MsgKind_ToggleFullscreen,
@@ -465,8 +492,8 @@ DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(no_addr);
DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox);
DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba);
C_LINKAGE_BEGIN
extern DF_MsgKindInfo df_msg_kind_info_table[107];
extern DF_MsgKindInfo df_d_msg_kind_info_table[69];
extern DF_MsgKindInfo df_msg_kind_info_table[134];
extern DF_MsgKindInfo df_d_msg_kind_info_table[36];
extern DF_StringBindingPair df_g_default_binding_table[110];
extern String8 df_g_binding_version_remap_old_name_table[7];
extern String8 df_g_binding_version_remap_new_name_table[7];
+47
View File
@@ -197,6 +197,13 @@ md_push_node(Arena *arena, MD_NodeKind kind, MD_NodeFlags flags, String8 string,
return node;
}
internal void
md_node_insert_child(MD_Node *parent, MD_Node *prev_child, MD_Node *node)
{
node->parent = parent;
DLLInsert_NPZ(&md_nil_node, parent->first, parent->last, prev_child, node, next, prev);
}
internal void
md_node_push_child(MD_Node *parent, MD_Node *node)
{
@@ -204,6 +211,19 @@ md_node_push_child(MD_Node *parent, MD_Node *node)
DLLPushBack_NPZ(&md_nil_node, parent->first, parent->last, node, next, prev);
}
internal void
md_node_remove_child(MD_Node *parent, MD_Node *node)
{
DLLRemove_NPZ(&md_nil_node, parent->first, parent->last, node, next, prev);
}
internal void
md_node_insert_tag(MD_Node *parent, MD_Node *prev_child, MD_Node *node)
{
node->parent = parent;
DLLInsert_NPZ(&md_nil_node, parent->first_tag, parent->last_tag, prev_child, node, next, prev);
}
internal void
md_node_push_tag(MD_Node *parent, MD_Node *node)
{
@@ -211,6 +231,12 @@ md_node_push_tag(MD_Node *parent, MD_Node *node)
DLLPushBack_NPZ(&md_nil_node, parent->first_tag, parent->last_tag, node, next, prev);
}
internal void
md_node_remove_tag(MD_Node *parent, MD_Node *node)
{
DLLRemove_NPZ(&md_nil_node, parent->first_tag, parent->last_tag, node, next, prev);
}
//- rjf: tree building helpers
internal MD_Node *
@@ -229,6 +255,27 @@ md_list_push_ref(Arena *arena, MD_Node *list, MD_Node *ref_dst)
return ref;
}
internal void
md_list_concat_in_place(MD_Node *dst, MD_Node **src)
{
if(!md_node_is_nil(dst->last) && !md_node_is_nil(src[0]->first))
{
dst->last->next = src[0]->first;
src[0]->first->prev = dst->last;
dst->last = src[0]->last;
}
else if(!md_node_is_nil(src[0]->first))
{
dst->first = src[0]->first;
dst->last = src[0]->last;
}
for(MD_EachNode(child, src[0]->first))
{
child->parent = dst;
}
MemoryZeroStruct(src);
}
//- rjf: tree introspection
internal MD_Node *
+5
View File
@@ -260,12 +260,17 @@ internal MD_NodeRec md_node_rec_depth_first(MD_Node *node, MD_Node *subtree_root
//- rjf: tree building
internal MD_Node *md_push_node(Arena *arena, MD_NodeKind kind, MD_NodeFlags flags, String8 string, String8 raw_string, U64 src_offset);
internal void md_node_insert_child(MD_Node *parent, MD_Node *prev_child, MD_Node *node);
internal void md_node_push_child(MD_Node *parent, MD_Node *node);
internal void md_node_remove_child(MD_Node *parent, MD_Node *node);
internal void md_node_insert_tag(MD_Node *parent, MD_Node *prev_child, MD_Node *node);
internal void md_node_push_tag(MD_Node *parent, MD_Node *node);
internal void md_node_remove_tag(MD_Node *parent, MD_Node *node);
//- rjf: tree building helpers
internal MD_Node *md_push_list(Arena *arena);
internal MD_Node *md_list_push_ref(Arena *arena, MD_Node *list, MD_Node *ref_dst);
internal void md_list_concat_in_place(MD_Node *dst, MD_Node **src);
//- rjf: tree introspection
internal MD_Node * md_node_from_chain_string(MD_Node *first, MD_Node *opl, String8 string, StringMatchFlags flags);