mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-10 11:09:44 +01: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;
|
FExceptionClass: string;
|
||||||
FExceptionMessage: string;
|
FExceptionMessage: string;
|
||||||
FExitCode: DWord;
|
FExitCode: DWord;
|
||||||
|
FGotExitProcess: Boolean;
|
||||||
FProcessID: Integer;
|
FProcessID: Integer;
|
||||||
FThreadID: Integer;
|
FThreadID: Integer;
|
||||||
|
|
||||||
@ -423,6 +424,7 @@ type
|
|||||||
|
|
||||||
property LastEventProcessIdentifier: THandle read GetLastEventProcessIdentifier;
|
property LastEventProcessIdentifier: THandle read GetLastEventProcessIdentifier;
|
||||||
property MainThread: TDbgThread read FMainThread;
|
property MainThread: TDbgThread read FMainThread;
|
||||||
|
property GotExitProcess: Boolean read FGotExitProcess write FGotExitProcess;
|
||||||
end;
|
end;
|
||||||
TDbgProcessClass = class of TDbgProcess;
|
TDbgProcessClass = class of TDbgProcess;
|
||||||
|
|
||||||
@ -1482,8 +1484,7 @@ begin
|
|||||||
|
|
||||||
Result := WriteData(ALocation, 1, OrigValue);
|
Result := WriteData(ALocation, 1, OrigValue);
|
||||||
DebugLn(DBG_VERBOSE or DBG_BREAKPOINTS, ['Breakpoint Int3 removed from '+FormatAddress(ALocation), ' Result:',Result, ' OVal:', OrigValue]);
|
DebugLn(DBG_VERBOSE or DBG_BREAKPOINTS, ['Breakpoint Int3 removed from '+FormatAddress(ALocation), ' Result:',Result, ' OVal:', OrigValue]);
|
||||||
if (not Result) then
|
DebugLn((not Result) and (not GotExitProcess) and (DBG_WARNINGS or DBG_BREAKPOINTS), 'Unable to reset breakpoint at %s', [FormatAddress(ALocation)]);
|
||||||
DebugLn(DBG_WARNINGS or DBG_BREAKPOINTS, 'Unable to reset breakpoint at %s', [FormatAddress(ALocation)]);
|
|
||||||
|
|
||||||
if Result then
|
if Result then
|
||||||
AfterChangingInstructionCode(ALocation);
|
AfterChangingInstructionCode(ALocation);
|
||||||
|
|||||||
@ -924,6 +924,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
(* Only events for the main process get here / See ProcessLoop *)
|
(* Only events for the main process get here / See ProcessLoop *)
|
||||||
if FCurrentProcess = FMainProcess then FMainProcess := nil;
|
if FCurrentProcess = FMainProcess then FMainProcess := nil;
|
||||||
|
FCurrentProcess.GotExitProcess := True;
|
||||||
|
|
||||||
if assigned(OnProcessExitEvent) then
|
if assigned(OnProcessExitEvent) then
|
||||||
OnProcessExitEvent(FCurrentProcess.ExitCode);
|
OnProcessExitEvent(FCurrentProcess.ExitCode);
|
||||||
|
|||||||
@ -157,7 +157,8 @@ end;
|
|||||||
|
|
||||||
procedure TDbgWinProcess.LogLastError;
|
procedure TDbgWinProcess.LogLastError;
|
||||||
begin
|
begin
|
||||||
DebugLn(DBG_WARNINGS, 'FpDbg-ERROR: %s', [GetLastErrorText]);
|
if not GotExitProcess then
|
||||||
|
DebugLn(DBG_WARNINGS, 'FpDbg-ERROR: %s', [GetLastErrorText]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgWinProcess.AfterChangingInstructionCode(const ALocation: TDBGPtr);
|
procedure TDbgWinProcess.AfterChangingInstructionCode(const ALocation: TDBGPtr);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user