Debugger: backslash handling in locals

git-svn-id: trunk@41279 -
This commit is contained in:
martin 2013-05-19 11:14:17 +00:00
parent 39903ad024
commit 8357d5ad1f

View File

@ -210,7 +210,7 @@ type
TGDBMIProcessResultOpt = ( TGDBMIProcessResultOpt = (
prNoLeadingTab, // Do not require/strip the leading #9 prNoLeadingTab, // Do not require/strip the leading #9
prKeepBackSlash // Workaround, because TGDBMINameValueList does already do this prKeepBackSlash // Workaround, backslash may have been removed already
); );
TGDBMIProcessResultOpts = set of TGDBMIProcessResultOpt; TGDBMIProcessResultOpts = set of TGDBMIProcessResultOpt;
@ -8851,11 +8851,11 @@ function TGDBMIDebuggerCommandLocals.DoExecute: Boolean;
procedure AddLocals(const AParams: String); procedure AddLocals(const AParams: String);
var var
n, e: Integer; n: Integer;
addr: TDbgPtr; addr: TDbgPtr;
LocList, List: TGDBMINameValueList; LocList, List: TGDBMINameValueList;
Item: PGDBMINameValue; Item: PGDBMINameValue;
S, Name, Value: String; Name, Value: String;
begin begin
LocList := TGDBMINameValueList.Create(AParams); LocList := TGDBMINameValueList.Create(AParams);
List := TGDBMINameValueList.Create(''); List := TGDBMINameValueList.Create('');
@ -8895,7 +8895,7 @@ function TGDBMIDebuggerCommandLocals.DoExecute: Boolean;
begin begin
// AnsiString // AnsiString
if (length(Value) > 0) and (Value[1] in ['''', '#']) then begin if (length(Value) > 0) and (Value[1] in ['''', '#']) then begin
Value := MakePrintable(ProcessGDBResultText(Value, [prNoLeadingTab, prKeepBackSlash])); Value := MakePrintable(ProcessGDBResultText(Value, [prNoLeadingTab]));
end end
else else
Value := DeleteEscapeChars(List.Values['value']); Value := DeleteEscapeChars(List.Values['value']);
@ -8903,7 +8903,7 @@ function TGDBMIDebuggerCommandLocals.DoExecute: Boolean;
else else
// ShortString // ShortString
if (length(Value) > 0) and (Value[1] in ['''', '#']) then begin if (length(Value) > 0) and (Value[1] in ['''', '#']) then begin
Value := MakePrintable(ProcessGDBResultText(Value, [prNoLeadingTab, prKeepBackSlash])); Value := MakePrintable(ProcessGDBResultText(Value, [prNoLeadingTab]));
end end
else else
Value := DeleteEscapeChars(Value); Value := DeleteEscapeChars(Value);