mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 19:40:25 +02:00
DBG: Fix pascalize pointer adding space into result of string (dwarf3)
git-svn-id: trunk@32925 -
This commit is contained in:
parent
810795ad1f
commit
0ec0a215fb
@ -11304,20 +11304,21 @@ var
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
Result := AString;
|
||||
if not IsHexC(AString)
|
||||
then exit;
|
||||
|
||||
// there may be data after the pointer
|
||||
s := GetPart([], [' '], AString, False, True);
|
||||
if IsHexC(s)
|
||||
if s = '0x0'
|
||||
then begin
|
||||
if s = '0x0'
|
||||
then begin
|
||||
Result := 'nil';
|
||||
end
|
||||
else begin
|
||||
// 0xabc0 => $0000ABC0
|
||||
Result := UpperCase(HexCToHexPascal(s, FTheDebugger.TargetWidth div 4));
|
||||
end;
|
||||
Result := 'nil';
|
||||
end
|
||||
else Result := s;
|
||||
else begin
|
||||
// 0xabc0 => $0000ABC0
|
||||
Result := UpperCase(HexCToHexPascal(s, FTheDebugger.TargetWidth div 4));
|
||||
end;
|
||||
|
||||
if TypeCast <> '' then
|
||||
Result := TypeCast + '(' + Result + ')';
|
||||
if AString <> '' then
|
||||
@ -11613,7 +11614,7 @@ var
|
||||
if (ResultInfo.TypeName = '&ShortString') then
|
||||
FTextValue := GetStrValue('ShortString(%s)', [AnExpression]) // we have an address here, so we need to typecast
|
||||
else
|
||||
if saDynArray in ResultInfo.Attributes then
|
||||
if saDynArray in ResultInfo.Attributes then // may also be a string
|
||||
FTextValue := PascalizePointer(FTextValue)
|
||||
else
|
||||
FTextValue := FTextValue;
|
||||
|
Loading…
Reference in New Issue
Block a user