mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 04:19:09 +02:00
GdbmiDebugger: skip shortstring for gdb 10.1 as it may cause errors / Add code to ignore (expected) internal errors
git-svn-id: trunk@64954 -
This commit is contained in:
parent
8c6dd0ff09
commit
2c0b13fb1f
@ -118,7 +118,8 @@ type
|
||||
dfForceBreak, // Debugger supports insertion of not yet known brekpoints
|
||||
dfForceBreakDetected,
|
||||
dfSetBreakFailed,
|
||||
dfSetBreakPending
|
||||
dfSetBreakPending,
|
||||
dfIgnoreInternalError
|
||||
);
|
||||
|
||||
TTargetRegisterIdent = (r0, r1, r2, rBreakErrNo);
|
||||
@ -2889,8 +2890,11 @@ begin
|
||||
if LazStartsText('type = ^EXCEPTION', R.Values)
|
||||
then include(TargetInfo^.TargetFlags, tfExceptionIsPointer);
|
||||
end;
|
||||
CheckHasType('Shortstring', tfFlagHasTypeShortstring);
|
||||
HadTimeout := HadTimeout and LastExecwasTimeOut;
|
||||
if FTheDebugger.FGDBVersionMajor < 10 then begin
|
||||
// causes internal error in gdb 10 // Maybe use dfIgnoreInternalError
|
||||
CheckHasType('Shortstring', tfFlagHasTypeShortstring);
|
||||
HadTimeout := HadTimeout and LastExecwasTimeOut;
|
||||
end;
|
||||
//CheckHasType('PShortstring', tfFlagHasTypePShortString);
|
||||
//HadTimeout := HadTimeout and LastExecwasTimeOut;
|
||||
CheckHasType('pointer', tfFlagHasTypePointer);
|
||||
@ -8917,7 +8921,7 @@ function TGDBMIDebuggerBase.CheckForInternalError(ALine, ACurCommandText: String
|
||||
|
||||
function IsErrorLine(const L: String): Boolean;
|
||||
begin
|
||||
Result := (PosI('internal-error:', L) > 0) or
|
||||
Result := (PosI('internal-error:', L) > 0)or
|
||||
(PosI('internal to gdb has been detected', L) > 0) or
|
||||
(PosI('further debugging may prove unreliable', L) > 0) or
|
||||
(PosI('command aborted.', L) > 0);
|
||||
@ -8937,7 +8941,7 @@ var
|
||||
S: String;
|
||||
i: Integer;
|
||||
begin
|
||||
Result := IsErrorLine(ALine);
|
||||
Result := IsErrorLine(ALine) ;
|
||||
if Result then begin
|
||||
FNeedReset := True;
|
||||
|
||||
@ -8950,6 +8954,9 @@ begin
|
||||
S := ReadLine(True, 50);
|
||||
end;
|
||||
|
||||
if (dfIgnoreInternalError in FDebuggerFlags) then
|
||||
exit;
|
||||
|
||||
DoDbgEvent(ecDebugger, etDefault, Format(gdbmiEventLogGDBInternalError, [ALine]));
|
||||
if (TGDBMIDebuggerProperties(GetProperties).WarnOnInternalError = TGDBMIDebuggerShowWarning.True) or
|
||||
( (TGDBMIDebuggerProperties(GetProperties).WarnOnInternalError = TGDBMIDebuggerShowWarning.OncePerRun)
|
||||
|
Loading…
Reference in New Issue
Block a user