DebuggerIntf, IDE: partially revert r53372 #ca66ef0c1c: don't format locals values, it slows down step-by-step debugging

git-svn-id: trunk@53374 -
This commit is contained in:
ondrej 2016-11-16 15:00:08 +00:00
parent 2e82f20fc5
commit e2599966ce
2 changed files with 6 additions and 36 deletions

View File

@ -763,16 +763,11 @@ type
private
FName: String;
FValue: String;
FDBGType: TDBGType;
procedure SetDBGType(const aDBGType: TDBGType);
protected
procedure DoAssign(AnOther: TDbgEntityValue); override;
public
destructor Destroy; override;
public
property Name: String read FName;
property Value: String read FValue;
property DBGType: TDBGType read FDBGType write SetDBGType;
end;
{ TLocals }
@ -2903,26 +2898,11 @@ end;
{ TLocalsValue }
destructor TLocalsValue.Destroy;
begin
FDBGType.Free;
inherited Destroy;
end;
procedure TLocalsValue.DoAssign(AnOther: TDbgEntityValue);
begin
inherited DoAssign(AnOther);
FName := TLocalsValue(AnOther).FName;
FValue := TLocalsValue(AnOther).FValue;
// don't assign FDBGType
end;
procedure TLocalsValue.SetDBGType(const aDBGType: TDBGType);
begin
if FDBGType = aDBGType then Exit;
FreeAndNil(FDBGType);
FDBGType := aDBGType;
end;
{ TLocalsListBase }

View File

@ -37,7 +37,7 @@ interface
uses
SysUtils, Classes, Forms, ClipBrd, LCLProc, LazLoggerBase, strutils,
IDEWindowIntf, DbgIntfDebuggerBase, DebuggerStrConst,
IDEWindowIntf, DebuggerStrConst,
ComCtrls, ActnList, Menus, BaseDebugManager, Debugger, DebuggerDlg;
type
@ -317,11 +317,9 @@ var
n, idx: Integer;
List: TStringList;
Item: TListItem;
S, DebugEval, FmtValue: String;
S: String;
Locals: TIDELocals;
Snap: TSnapshot;
DBGType: TDBGType;
LocValue: TLocalsValue;
begin
if (ThreadsMonitor = nil) or (CallStackMonitor = nil) or (LocalsMonitor=nil) then begin
lvLocals.Items.Clear;
@ -377,26 +375,18 @@ begin
// add/update entries
for n := 0 to Locals.Count - 1 do
begin
DebugEval := '';
DBGType := nil;
LocValue := Locals.Entries[n];
FmtValue := LocValue.Value;
if (LocValue.DBGType=nil) and (DebugBoss.Evaluate(LocValue.Name, DebugEval, DBGType, [])) then
LocValue.DBGType := DBGType;
if (LocValue.DBGType<>nil) then
FmtValue := DebugBoss.FormatValue(LocValue.DBGType, FmtValue);
idx := List.IndexOf(Uppercase(LocValue.Name));
idx := List.IndexOf(Uppercase(Locals.Names[n]));
if idx = -1
then begin
// New entry
Item := lvLocals.Items.Add;
Item.Caption := LocValue.Name;
Item.SubItems.Add(FmtValue);
Item.Caption := Locals.Names[n];
Item.SubItems.Add(Locals.Values[n]);
end
else begin
// Existing entry
Item := TListItem(List.Objects[idx]);
Item.SubItems[0] := FmtValue;
Item.SubItems[0] := Locals.Values[n];
List.Delete(idx);
end;
end;