mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 21:19:07 +02:00
FpDebug: reduce logged errors for messages that are expected (cannot write to terminated process)
git-svn-id: trunk@61816 -
This commit is contained in:
parent
2fa22bf873
commit
c86c8d65e6
@ -330,6 +330,7 @@ type
|
||||
FExceptionClass: string;
|
||||
FExceptionMessage: string;
|
||||
FExitCode: DWord;
|
||||
FGotExitProcess: Boolean;
|
||||
FProcessID: Integer;
|
||||
FThreadID: Integer;
|
||||
|
||||
@ -423,6 +424,7 @@ type
|
||||
|
||||
property LastEventProcessIdentifier: THandle read GetLastEventProcessIdentifier;
|
||||
property MainThread: TDbgThread read FMainThread;
|
||||
property GotExitProcess: Boolean read FGotExitProcess write FGotExitProcess;
|
||||
end;
|
||||
TDbgProcessClass = class of TDbgProcess;
|
||||
|
||||
@ -1482,8 +1484,7 @@ begin
|
||||
|
||||
Result := WriteData(ALocation, 1, OrigValue);
|
||||
DebugLn(DBG_VERBOSE or DBG_BREAKPOINTS, ['Breakpoint Int3 removed from '+FormatAddress(ALocation), ' Result:',Result, ' OVal:', OrigValue]);
|
||||
if (not Result) then
|
||||
DebugLn(DBG_WARNINGS or DBG_BREAKPOINTS, 'Unable to reset breakpoint at %s', [FormatAddress(ALocation)]);
|
||||
DebugLn((not Result) and (not GotExitProcess) and (DBG_WARNINGS or DBG_BREAKPOINTS), 'Unable to reset breakpoint at %s', [FormatAddress(ALocation)]);
|
||||
|
||||
if Result then
|
||||
AfterChangingInstructionCode(ALocation);
|
||||
|
@ -924,6 +924,7 @@ begin
|
||||
begin
|
||||
(* Only events for the main process get here / See ProcessLoop *)
|
||||
if FCurrentProcess = FMainProcess then FMainProcess := nil;
|
||||
FCurrentProcess.GotExitProcess := True;
|
||||
|
||||
if assigned(OnProcessExitEvent) then
|
||||
OnProcessExitEvent(FCurrentProcess.ExitCode);
|
||||
|
@ -157,7 +157,8 @@ end;
|
||||
|
||||
procedure TDbgWinProcess.LogLastError;
|
||||
begin
|
||||
DebugLn(DBG_WARNINGS, 'FpDbg-ERROR: %s', [GetLastErrorText]);
|
||||
if not GotExitProcess then
|
||||
DebugLn(DBG_WARNINGS, 'FpDbg-ERROR: %s', [GetLastErrorText]);
|
||||
end;
|
||||
|
||||
procedure TDbgWinProcess.AfterChangingInstructionCode(const ALocation: TDBGPtr);
|
||||
|
Loading…
Reference in New Issue
Block a user