@@ -1108,6 +1108,40 @@ package body DAP.Module.Breakpoints is
11081108 end if ;
11091109 end Set_Breakpoints_State ;
11101110
1111+ -- -----------------------------
1112+ -- Get_Breakpoint_From_Index --
1113+ -- -----------------------------
1114+
1115+ function Get_Breakpoint_From_Index
1116+ (Index : Positive) return Breakpoint_Data is
1117+ begin
1118+ if DAP.Module.Get_Current_Debugger = null then
1119+ return Persistent_Breakpoints.Get_Breakpoint_From_Index (Index);
1120+ else
1121+ return DAP.Module.Get_Current_Debugger.Get_Breakpoints_Manager.
1122+ Get_Breakpoint_From_Index (Index);
1123+ end if ;
1124+ end Get_Breakpoint_From_Index ;
1125+
1126+ -- ---------------------------
1127+ -- Set_Breakpoint_At_Index --
1128+ -- ---------------------------
1129+
1130+ procedure Set_Breakpoint_At_Index
1131+ (Kernel : not null access Kernel_Handle_Record'Class;
1132+ Data : Breakpoint_Data;
1133+ Index : Positive) is
1134+ begin
1135+ if DAP.Module.Get_Current_Debugger = null then
1136+ Persistent_Breakpoints.Replace (Data, Index);
1137+ GPS.Kernel.Hooks.Debugger_Breakpoints_Changed_Hook.Run
1138+ (Kernel, null );
1139+ else
1140+ DAP.Module.Get_Current_Debugger.Get_Breakpoints_Manager.
1141+ Replace_Breakpoint_At_Index (Data, Index);
1142+ end if ;
1143+ end Set_Breakpoint_At_Index ;
1144+
11111145 -- -----------------------
11121146 -- Store_As_Persistent --
11131147 -- -----------------------
0 commit comments