mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 04:37:35 +01:00
FpDbg: Moved Windows-specific code to terminate the process to fpdbgwinclasses.pas
git-svn-id: trunk@44437 -
This commit is contained in:
parent
eba8717294
commit
6974915b8b
@ -269,7 +269,7 @@ begin
|
||||
end;
|
||||
|
||||
WriteLN('Terminating ...');
|
||||
TerminateProcess(GMainProcess.Handle, 0);
|
||||
GMainProcess.TerminateProcess;
|
||||
if GState = dsPause
|
||||
then DebugLoop; // continue runnig so we can terminate
|
||||
end;
|
||||
|
||||
@ -175,6 +175,8 @@ type
|
||||
function GetInstructionPointerRegisterValue: TDbgPtr; virtual; abstract;
|
||||
function GetStackBasePointerRegisterValue: TDbgPtr; virtual; abstract;
|
||||
|
||||
procedure TerminateProcess; virtual; abstract;
|
||||
|
||||
property Handle: THandle read GetHandle;
|
||||
property Name: String read FName write SetName;
|
||||
property ProcessID: integer read FProcessID;
|
||||
|
||||
@ -100,6 +100,8 @@ type
|
||||
function GetInstructionPointerRegisterValue: TDbgPtr; override;
|
||||
function GetStackBasePointerRegisterValue: TDbgPtr; override;
|
||||
|
||||
procedure TerminateProcess; override;
|
||||
|
||||
function AddrOffset: Int64; override;
|
||||
function AddLib(const AInfo: TLoadDLLDebugInfo): TDbgLibrary;
|
||||
procedure AddThread(const AID: Integer; const AInfo: TCreateThreadDebugInfo);
|
||||
@ -852,6 +854,11 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TDbgWinProcess.TerminateProcess;
|
||||
begin
|
||||
Windows.TerminateProcess(Handle, 0);
|
||||
end;
|
||||
|
||||
function TDbgWinProcess.AddrOffset: Int64;
|
||||
begin
|
||||
Result:=inherited AddrOffset - TDbgPtr(FInfo.lpBaseOfImage);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user