mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-09 01:39:32 +01:00
debuggergdbmi: use TProcessUTF8 instead of UTF8toSys
git-svn-id: trunk@44133 -
This commit is contained in:
parent
9c2555f89f
commit
a9b919d1b4
@ -39,8 +39,8 @@ unit CmdLineDebugger;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Types, Process, FileUtil, LCLProc, LazLoggerBase, DbgIntfDebuggerBase,
|
Classes, Types, process, FileUtil, LCLProc, LazLoggerBase, UTF8Process,
|
||||||
Forms, DebugUtils;
|
DbgIntfDebuggerBase, Forms, DebugUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ type
|
|||||||
|
|
||||||
TCmdLineDebugger = class(TDebuggerIntf)
|
TCmdLineDebugger = class(TDebuggerIntf)
|
||||||
private
|
private
|
||||||
FDbgProcess: TProcess; // The process used to call the debugger
|
FDbgProcess: TProcessUTF8; // The process used to call the debugger
|
||||||
FLineEnds: TStringDynArray; // List of strings considered as lineends
|
FLineEnds: TStringDynArray; // List of strings considered as lineends
|
||||||
FOutputBuf: String;
|
FOutputBuf: String;
|
||||||
FReading: Boolean; // Set if we are in the ReadLine loop
|
FReading: Boolean; // Set if we are in the ReadLine loop
|
||||||
@ -80,7 +80,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure TestCmd(const ACommand: String); virtual;// For internal debugging purposes
|
procedure TestCmd(const ACommand: String); virtual;// For internal debugging purposes
|
||||||
public
|
public
|
||||||
property DebugProcess: TProcess read FDbgProcess;
|
property DebugProcess: TProcessUTF8 read FDbgProcess;
|
||||||
property DebugProcessRunning: Boolean read GetDebugProcessRunning;
|
property DebugProcessRunning: Boolean read GetDebugProcessRunning;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -330,13 +330,13 @@ function TCmdLineDebugger.CreateDebugProcess(const AOptions: String): Boolean;
|
|||||||
begin
|
begin
|
||||||
if FDbgProcess = nil
|
if FDbgProcess = nil
|
||||||
then begin
|
then begin
|
||||||
FDbgProcess := TProcess.Create(nil);
|
FDbgProcess := TProcessUTF8.Create(nil);
|
||||||
FDbgProcess.CommandLine := UTF8ToSys(ExternalDebugger + ' ' + AOptions);
|
FDbgProcess.CommandLine := ExternalDebugger + ' ' + AOptions;
|
||||||
// TODO: under win9x and winMe should be created with console,
|
// TODO: under win9x and winMe should be created with console,
|
||||||
// otherwise no break can be sent.
|
// otherwise no break can be sent.
|
||||||
FDbgProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut, poNewProcessGroup];
|
FDbgProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut, poNewProcessGroup];
|
||||||
FDbgProcess.ShowWindow := swoNone;
|
FDbgProcess.ShowWindow := swoNone;
|
||||||
AssignUTF8ListToAnsi(DebuggerEnvironment,FDbgProcess.Environment);
|
FDbgProcess.Environment:=DebuggerEnvironment;
|
||||||
end;
|
end;
|
||||||
if not FDbgProcess.Running
|
if not FDbgProcess.Running
|
||||||
then begin
|
then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user