mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 21:27:21 +01:00
+ Disable all invalid breakpoints feature added
This commit is contained in:
parent
b446a7d124
commit
7f2460890b
@ -33,6 +33,7 @@ type
|
||||
{ if true the current debugger raw will stay in middle of
|
||||
editor window when debugging PM }
|
||||
CenterDebuggerRow : boolean;
|
||||
Disableallinvalidbreakpoints : boolean;
|
||||
LastFileName : string;
|
||||
LastSource : PView; {PsourceWindow !! }
|
||||
HiddenStepsCount : longint;
|
||||
@ -396,7 +397,7 @@ uses
|
||||
Systems,Globals,
|
||||
FPString,FPVars,FPUtils,FPConst,FPSwitch,
|
||||
FPIntf,FPCompil,FPIde,FPHelp,
|
||||
Validate,WEditor,WUtils;
|
||||
Validate,WEditor,WUtils,Wconsts;
|
||||
|
||||
const
|
||||
RBreakpointsWindow: TStreamRec = (
|
||||
@ -603,6 +604,7 @@ constructor TDebugController.Init;
|
||||
begin
|
||||
inherited Init;
|
||||
CenterDebuggerRow:=IniCenterDebuggerRow;
|
||||
Disableallinvalidbreakpoints:=false;
|
||||
NoSwitch:=False;
|
||||
HasExe:=false;
|
||||
Debugger:=@self;
|
||||
@ -695,6 +697,7 @@ procedure TDebugController.InsertBreakpoints;
|
||||
|
||||
begin
|
||||
BreakpointsCollection^.ForEach(@DoInsert);
|
||||
Disableallinvalidbreakpoints:=false;
|
||||
end;
|
||||
|
||||
procedure TDebugController.ReadWatches;
|
||||
@ -1511,19 +1514,24 @@ begin
|
||||
{ Here there was a problem !! }
|
||||
begin
|
||||
GDBIndex:=0;
|
||||
if (typ=bt_file_line) and assigned(FileName) then
|
||||
if not Debugger^.Disableallinvalidbreakpoints then
|
||||
begin
|
||||
ClearFormatParams;
|
||||
AddFormatParamStr(NameAndExtOf(FileName^));
|
||||
AddFormatParamInt(Line);
|
||||
ErrorBox(msg_couldnotsetbreakpointat,@FormatParams);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ClearFormatParams;
|
||||
AddFormatParamStr(BreakpointTypeStr[typ]);
|
||||
AddFormatParamStr(GetStr(Name));
|
||||
ErrorBox(msg_couldnotsetbreakpointtype,@FormatParams);
|
||||
if (typ=bt_file_line) and assigned(FileName) then
|
||||
begin
|
||||
ClearFormatParams;
|
||||
AddFormatParamStr(NameAndExtOf(FileName^));
|
||||
AddFormatParamInt(Line);
|
||||
if ChoiceBox(msg_couldnotsetbreakpointat,@FormatParams,[btn_ok,btn_disableallbreakpoints],false)=cmUserBtn2 then
|
||||
Debugger^.Disableallinvalidbreakpoints:=true;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ClearFormatParams;
|
||||
AddFormatParamStr(BreakpointTypeStr[typ]);
|
||||
AddFormatParamStr(GetStr(Name));
|
||||
if ChoiceBox(msg_couldnotsetbreakpointtype,@FormatParams,[btn_ok,btn_disableallbreakpoints],false)=cmUserBtn2 then
|
||||
Debugger^.Disableallinvalidbreakpoints:=true;
|
||||
end;
|
||||
end;
|
||||
state:=bs_disabled;
|
||||
end;
|
||||
@ -4133,7 +4141,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2002-06-10 19:26:48 pierre
|
||||
Revision 1.22 2002-08-13 07:15:02 pierre
|
||||
+ Disable all invalid breakpoints feature added
|
||||
|
||||
Revision 1.21 2002/06/10 19:26:48 pierre
|
||||
* check if DebuggeTTY is a valid terminal
|
||||
|
||||
Revision 1.20 2002/06/06 14:11:25 pierre
|
||||
|
||||
@ -850,6 +850,7 @@ const
|
||||
#3+'%s:%d';
|
||||
msg_couldnotsetbreakpointtype = #3'Could not set Breakpoint'#13+
|
||||
#3+'%s %s';
|
||||
btn_disableallbreakpoints = 'Disable all invalid';
|
||||
|
||||
{ standard button texts }
|
||||
button_OK = 'O~K~';
|
||||
@ -1032,7 +1033,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.9 2002-04-12 08:59:42 pierre
|
||||
Revision 1.10 2002-08-13 07:15:02 pierre
|
||||
+ Disable all invalid breakpoints feature added
|
||||
|
||||
Revision 1.9 2002/04/12 08:59:42 pierre
|
||||
+ two new dialogs in case of internal errors
|
||||
|
||||
Revision 1.8 2002/03/27 11:23:18 pierre
|
||||
|
||||
Loading…
Reference in New Issue
Block a user