mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 04:39:52 +01:00
debugger: convert widestring output to the utf8
git-svn-id: trunk@18043 -
This commit is contained in:
parent
542163b6b9
commit
7fd8f0dd3f
@ -153,7 +153,7 @@ type
|
|||||||
function GetInstanceClassName(const AExpression: String; const AValues: array of const): String; overload;
|
function GetInstanceClassName(const AExpression: String; const AValues: array of const): String; overload;
|
||||||
function GetText(const ALocation: TDBGPtr): String; overload;
|
function GetText(const ALocation: TDBGPtr): String; overload;
|
||||||
function GetText(const AExpression: String; const AValues: array of const): String; overload;
|
function GetText(const AExpression: String; const AValues: array of const): String; overload;
|
||||||
function GetWideText(const ALocation: TDBGPtr): WideString;
|
function GetWideText(const ALocation: TDBGPtr): String;
|
||||||
function GetData(const ALocation: TDbgPtr): TDbgPtr; overload;
|
function GetData(const ALocation: TDbgPtr): TDbgPtr; overload;
|
||||||
function GetData(const AExpression: String; const AValues: array of const): TDbgPtr; overload;
|
function GetData(const AExpression: String; const AValues: array of const): TDbgPtr; overload;
|
||||||
function GetStrValue(const AExpression: String; const AValues: array of const): String;
|
function GetStrValue(const AExpression: String; const AValues: array of const): String;
|
||||||
@ -1761,7 +1761,7 @@ begin
|
|||||||
Result := Result + Trailor;
|
Result := Result + Trailor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGDBMIDebugger.GetWideText(const ALocation: TDBGPtr): WideString;
|
function TGDBMIDebugger.GetWideText(const ALocation: TDBGPtr): String;
|
||||||
|
|
||||||
function GetWideChar(const ALocation: TDBGPtr): WideChar;
|
function GetWideChar(const ALocation: TDBGPtr): WideChar;
|
||||||
var
|
var
|
||||||
@ -1781,17 +1781,19 @@ function TGDBMIDebugger.GetWideText(const ALocation: TDBGPtr): WideString;
|
|||||||
var
|
var
|
||||||
OneChar: WideChar;
|
OneChar: WideChar;
|
||||||
CurLocation: TDBGPtr;
|
CurLocation: TDBGPtr;
|
||||||
|
WStr: WideString;
|
||||||
begin
|
begin
|
||||||
Result := '';
|
WStr := '';
|
||||||
CurLocation := ALocation;
|
CurLocation := ALocation;
|
||||||
repeat
|
repeat
|
||||||
OneChar := GetWideChar(CurLocation);
|
OneChar := GetWideChar(CurLocation);
|
||||||
if OneChar <> #0 then
|
if OneChar <> #0 then
|
||||||
begin
|
begin
|
||||||
Result := Result + OneChar;
|
WStr := WStr + OneChar;
|
||||||
CurLocation := CurLocation + 2;
|
CurLocation := CurLocation + 2;
|
||||||
end;
|
end;
|
||||||
until (OneChar = #0);
|
until (OneChar = #0);
|
||||||
|
Result := UTF8Encode(WStr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGDBMIDebugger.GetSupportedCommands: TDBGCommands;
|
function TGDBMIDebugger.GetSupportedCommands: TDBGCommands;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user