converge watch pin / breakpoint commands & mapping, without file entity structure

This commit is contained in:
Ryan Fleury
2024-08-14 15:41:18 -07:00
parent 94791e62ff
commit 857bf44001
5 changed files with 50 additions and 55 deletions
+28 -40
View File
@@ -7871,6 +7871,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt)
if(!removed_already_existing)
{
DF_Entity *bp = df_entity_alloc(df_entity_root(), DF_EntityKind_Breakpoint);
df_entity_equip_cfg_src(bp, DF_CfgSrc_Project);
DF_Entity *loc = df_entity_alloc(bp, DF_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
@@ -7894,58 +7895,45 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt)
}break;
//- rjf: watches
case DF_CoreCmdKind_AddWatchPin:
case DF_CoreCmdKind_ToggleWatchPin:
{
DF_Entity *entity = df_entity_from_handle(params.entity);
S64 line_num = params.text_point.line;
if(!df_entity_is_nil(entity) && line_num != 0)
String8 file_path = params.file_path;
TxtPt pt = params.text_point;
String8 name = params.string;
U64 vaddr = params.vaddr;
B32 removed_already_existing = 0;
if(core_cmd_kind == DF_CoreCmdKind_ToggleWatchPin)
{
B32 removed_existing = 0;
for(DF_Entity *child = entity->first, *next = 0; !df_entity_is_nil(child); child = next)
DF_EntityList wps = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin);
for(DF_EntityNode *n = wps.first; n != 0; n = n->next)
{
next = child->next;
if(child->kind == DF_EntityKind_WatchPin && child->flags & DF_EntityFlag_HasTextPoint && child->text_point.line == line_num &&
str8_match(child->name, params.string, 0))
DF_Entity *wp = n->entity;
DF_Entity *loc = df_entity_child_from_kind(wp, DF_EntityKind_Location);
if((loc->flags & DF_EntityFlag_HasTextPoint && path_match_normalized(loc->name, file_path) && loc->text_point.line == pt.line) ||
(loc->flags & DF_EntityFlag_HasVAddr && loc->vaddr == vaddr) ||
(!(loc->flags & DF_EntityFlag_HasTextPoint) && str8_match(loc->name, name, 0)))
{
removed_existing = 1;
df_entity_mark_for_deletion(child);
df_entity_mark_for_deletion(wp);
removed_already_existing = 1;
break;
}
}
if(removed_existing == 0)
{
DF_Entity *watch = &df_g_nil_entity;
DF_StateDeltaHistoryBatch(df_state_delta_history())
{
watch = df_entity_alloc(entity, DF_EntityKind_WatchPin);
}
df_entity_equip_txt_pt(watch, params.text_point);
df_entity_equip_name(watch, params.string);
df_entity_equip_cfg_src(watch, DF_CfgSrc_Project);
}
}
else if(params.vaddr != 0)
if(!removed_already_existing)
{
B32 removed_existing = 0;
DF_EntityList pins = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin);
for(DF_EntityNode *n = pins.first; n != 0; n = n->next)
DF_Entity *wp = df_entity_alloc(df_entity_root(), DF_EntityKind_WatchPin);
df_entity_equip_name(wp, name);
df_entity_equip_cfg_src(wp, DF_CfgSrc_Project);
DF_Entity *loc = df_entity_alloc(wp, DF_EntityKind_Location);
if(file_path.size != 0 && pt.line != 0)
{
DF_Entity *pin = n->entity;
if(pin->flags & DF_EntityFlag_HasVAddr && pin->vaddr == params.vaddr && str8_match(pin->name, params.string, 0))
{
removed_existing = 1;
df_entity_mark_for_deletion(pin);
}
df_entity_equip_name(loc, file_path);
df_entity_equip_txt_pt(loc, pt);
}
if(!removed_existing)
else if(vaddr != 0)
{
DF_Entity *pin = &df_g_nil_entity;
DF_StateDeltaHistoryBatch(df_state_delta_history())
{
pin = df_entity_alloc(df_entity_root(), DF_EntityKind_WatchPin);
}
df_entity_equip_vaddr(pin, params.vaddr);
df_entity_equip_name(pin, params.string);
df_entity_equip_cfg_src(pin, DF_CfgSrc_Project);
df_entity_equip_vaddr(loc, vaddr);
}
}
}break;
+9 -6
View File
@@ -18,8 +18,8 @@ DF_CfgSrcTable:
@table(name name_lower name_lower_plural op_delete op_freeze op_edit op_rename op_enable op_cond op_dup lf_mut_user_cfg tr_mut_user_cfg lf_mut_prof_cfg tr_mut_prof_cfg lf_mut_halt lf_mut_dbg tr_mut_halt tr_mut_dbg name_is_code name_is_path user_lifetime is_serialized name_label icon_kind display_string)
// | |
// | _________________________________________________________________________________________________________________________________________________________________________________________________/
// | /
// | __________________________________________________________________________________________________________________________________________________________________________________________/
// | /
// operations________ mutation cascading__ names lt sz
// /..................\ /....................\ /...\ | |
// dl fz ed rn en cn dp lu tu lp tp lh ld th td nc np ul iz
@@ -154,7 +154,7 @@ DF_CoreCmdTable:// | | | |
{Restart 1 1 Null Nil 0 0 0 0 0 0 Redo "restart" "Restart" "Kills all running processes, then restarts the targets which were used to launch all current processes (if any)." "restart,retry" }
{StepInto 1 1 Null Nil 0 0 0 0 0 0 StepInto "step_into" "Step Into" "Steps once, possibly into function calls, for either line or instructions." "" }
{StepOver 1 1 Null Nil 0 0 0 0 0 0 StepOver "step_over" "Step Over" "Steps once, always over function calls, for either line or instructions." "" }
{RunToCursor 1 1 Null Nil 0 0 0 0 0 0 Play "run_to_cursor" "Run To Cursor" "Runs the selected thread to the current cursor." "" }
{RunToCursor 1 1 Null Nil 0 0 0 0 0 0 Play "run_to_cursor" "Run To Cursor" "Runs the selected thread to the current cursor." "line" }
{SetNextStatement 1 1 Null Nil 0 0 0 0 0 0 RightArrow "set_next_statement" "Set Next Statement" "Sets the selected thread's instruction pointer to the cursor's position." "" }
//- rjf: debug control context management operations
@@ -353,13 +353,16 @@ DF_CoreCmdTable:// | | | |
{AddAddressBreakpoint 1 0 VirtualAddr Nil 0 0 0 0 1 1 CircleFilled "add_address_breakpoint" "Add Address Breakpoint" "Places a breakpoint on the specified address." "" }
{AddFunctionBreakpoint 1 0 String Nil 0 0 0 0 1 1 CircleFilled "add_function_breakpoint" "Add Function Breakpoint" "Places a breakpoint on the first address(es) of the specified function." "" }
{ToggleBreakpoint 0 1 Null Nil 0 0 0 0 0 0 CircleFilled "toggle_breakpoint" "Toggle Breakpoint" "Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)." "" }
{ToggleBreakpointAtCursor 1 1 Null Nil 0 0 0 0 0 0 CircleFilled "toggle_breakpoint_cursor" "Toggle Breakpoint At Cursor" "Places or removes a breakpoint on the line on which the active cursor sits." "" }
{RemoveBreakpoint 1 1 Entity Breakpoint 0 0 0 0 0 1 Trash "remove_breakpoint" "Remove Breakpoint" "Removes an existing breakpoint." "" }
{EnableBreakpoint 1 1 Entity Breakpoint 0 0 0 0 0 1 CheckFilled "enable_breakpoint" "Enable Breakpoint" "Enables a breakpoint." "" }
{DisableBreakpoint 1 1 Entity Breakpoint 0 0 0 0 0 1 CheckHollow "disable_breakpoint" "Disable Breakpoint" "Disables a breakpoint." "" }
//- rjf: watches
{ToggleWatchPin 0 0 Null Nil 0 0 0 0 0 0 Binoculars "toggle_watch_pin" "Toggle Watch Pin" "Places or removes a watch pin on a textual location on a particular entity." "" }
//- rjf: watch pins
{AddWatchPin 0 1 Null Nil 0 0 0 0 0 0 Binoculars "add_watch_pin" "Add Watch Pin" "Places a watch pin at a given location (file path and line number or address)." "" }
{ToggleWatchPin 0 0 Null Nil 0 0 0 0 0 0 Binoculars "toggle_watch_pin" "Toggle Watch Pin" "Places or removes a watch pin at a given location (file path and line number or address)." "" }
//- rjf: cursor operations
{ToggleBreakpointAtCursor 1 1 Null Nil 0 0 0 0 0 0 CircleFilled "toggle_breakpoint_cursor" "Toggle Breakpoint At Cursor" "Places or removes a breakpoint on the line on which the active cursor sits." "" }
{ToggleWatchPinAtCursor 1 1 String Nil 0 0 0 0 1 1 Binoculars "toggle_watch_pin_at_cursor" "Toggle Watch Pin At Cursor" "Places or removes a watch pin at the cursor on the currently active file." "" }
//- rjf: targets
+5 -4
View File
@@ -256,7 +256,7 @@ DF_CoreCmdKind_Null,
DF_CoreCmdKind_Null,
};
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] =
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[222] =
{
{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
@@ -283,7 +283,7 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] =
{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Redo},
{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto},
{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver},
{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp(""), str8_lit_comp("Run To Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp("line"), str8_lit_comp("Run To Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
@@ -426,11 +426,12 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] =
{ str8_lit_comp("add_address_breakpoint"), str8_lit_comp("Places a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Add Address Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled},
{ str8_lit_comp("add_function_breakpoint"), str8_lit_comp("Places a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Add Function Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled},
{ str8_lit_comp("toggle_breakpoint"), str8_lit_comp("Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash},
{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled},
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow},
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin on a textual location on a particular entity."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Binoculars},
{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Target},
{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash},
+2 -1
View File
@@ -218,11 +218,12 @@ DF_CoreCmdKind_AddBreakpoint,
DF_CoreCmdKind_AddAddressBreakpoint,
DF_CoreCmdKind_AddFunctionBreakpoint,
DF_CoreCmdKind_ToggleBreakpoint,
DF_CoreCmdKind_ToggleBreakpointAtCursor,
DF_CoreCmdKind_RemoveBreakpoint,
DF_CoreCmdKind_EnableBreakpoint,
DF_CoreCmdKind_DisableBreakpoint,
DF_CoreCmdKind_AddWatchPin,
DF_CoreCmdKind_ToggleWatchPin,
DF_CoreCmdKind_ToggleBreakpointAtCursor,
DF_CoreCmdKind_ToggleWatchPinAtCursor,
DF_CoreCmdKind_AddTarget,
DF_CoreCmdKind_RemoveTarget,
+6 -4
View File
@@ -693,9 +693,10 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view,
for(DF_EntityNode *n = bps.first; n != 0; n = n->next)
{
DF_Entity *bp = n->entity;
if(bp->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, bp->vaddr))
DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location);
if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr))
{
U64 off = bp->vaddr-dasm_vaddr_range.min;
U64 off = loc->vaddr-dasm_vaddr_range.min;
U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off);
S64 line_num = (S64)(idx+1);
if(contains_1s64(visible_line_num_range, line_num))
@@ -714,9 +715,10 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view,
for(DF_EntityNode *n = pins.first; n != 0; n = n->next)
{
DF_Entity *pin = n->entity;
if(pin->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, pin->vaddr))
DF_Entity *loc = df_entity_child_from_kind(pin, DF_EntityKind_Location);
if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr))
{
U64 off = pin->vaddr-dasm_vaddr_range.min;
U64 off = loc->vaddr-dasm_vaddr_range.min;
U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off);
S64 line_num = (S64)(idx+1);
if(contains_1s64(visible_line_num_range, line_num))