mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:21:24 +02:00
Ide,FpDebug: In FpDebug add a thread number (order of first occurrence). In the IDE, prefix the ID with the number.
This commit is contained in:
parent
b2dc565bb3
commit
8ed6d90eb1
@ -1217,6 +1217,7 @@ type
|
|||||||
FTopFrame: TCallStackEntry;
|
FTopFrame: TCallStackEntry;
|
||||||
protected
|
protected
|
||||||
FThreadId: Integer;
|
FThreadId: Integer;
|
||||||
|
FThreadNum: Integer;
|
||||||
FThreadName: String;
|
FThreadName: String;
|
||||||
FThreadState: TDbgThreadState;
|
FThreadState: TDbgThreadState;
|
||||||
procedure SetThreadState(AValue: TDbgThreadState); virtual;
|
procedure SetThreadState(AValue: TDbgThreadState); virtual;
|
||||||
@ -1229,20 +1230,23 @@ type
|
|||||||
const ALine: Integer;
|
const ALine: Integer;
|
||||||
const AThreadId: Integer; const AThreadName: String;
|
const AThreadId: Integer; const AThreadName: String;
|
||||||
const AThreadState: TDbgThreadState;
|
const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState = ddsValid);
|
AState: TDebuggerDataState = ddsValid;
|
||||||
|
AThreadNum: Integer = 0);
|
||||||
procedure Init(const AnAdress: TDbgPtr;
|
procedure Init(const AnAdress: TDbgPtr;
|
||||||
const AnArguments: TStrings; const AFunctionName: String;
|
const AnArguments: TStrings; const AFunctionName: String;
|
||||||
const FileName, FullName: String;
|
const FileName, FullName: String;
|
||||||
const ALine: Integer;
|
const ALine: Integer;
|
||||||
const AThreadId: Integer; const AThreadName: String;
|
const AThreadId: Integer; const AThreadName: String;
|
||||||
const AThreadState: TDbgThreadState;
|
const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState = ddsValid);
|
AState: TDebuggerDataState = ddsValid;
|
||||||
|
AThreadNum: Integer = 0);
|
||||||
procedure SetThreadStateOnly(AValue: TDbgThreadState); virtual;
|
procedure SetThreadStateOnly(AValue: TDbgThreadState); virtual;
|
||||||
function CreateCopy: TThreadEntry; virtual;
|
function CreateCopy: TThreadEntry; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Assign(AnOther: TThreadEntry); virtual;
|
procedure Assign(AnOther: TThreadEntry); virtual;
|
||||||
published
|
published
|
||||||
property ThreadId: Integer read FThreadId;
|
property ThreadId: Integer read FThreadId;
|
||||||
|
property ThreadNum: Integer read FThreadNum;
|
||||||
property ThreadName: String read FThreadName;
|
property ThreadName: String read FThreadName;
|
||||||
property ThreadState: TDbgThreadState read FThreadState write SetThreadState;
|
property ThreadState: TDbgThreadState read FThreadState write SetThreadState;
|
||||||
property TopFrame: TCallStackEntry read FTopFrame;
|
property TopFrame: TCallStackEntry read FTopFrame;
|
||||||
@ -1273,7 +1277,8 @@ type
|
|||||||
const ALine: Integer;
|
const ALine: Integer;
|
||||||
const AThreadId: Integer; const AThreadName: String;
|
const AThreadId: Integer; const AThreadName: String;
|
||||||
const AThreadState: TDbgThreadState;
|
const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState = ddsValid): TThreadEntry; virtual;
|
AState: TDebuggerDataState = ddsValid;
|
||||||
|
AThreadNum: Integer = 0): TThreadEntry; virtual;
|
||||||
procedure SetValidity({%H-}AValidity: TDebuggerDataState); virtual;
|
procedure SetValidity({%H-}AValidity: TDebuggerDataState); virtual;
|
||||||
property Entries[const AnIndex: Integer]: TThreadEntry read GetEntry; default;
|
property Entries[const AnIndex: Integer]: TThreadEntry read GetEntry; default;
|
||||||
property EntryById[const AnID: Integer]: TThreadEntry read GetEntryById;
|
property EntryById[const AnID: Integer]: TThreadEntry read GetEntryById;
|
||||||
@ -2286,10 +2291,11 @@ constructor TThreadEntry.Create(const AnAdress: TDbgPtr;
|
|||||||
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
||||||
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
||||||
const AThreadName: String; const AThreadState: TDbgThreadState;
|
const AThreadName: String; const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState);
|
AState: TDebuggerDataState; AThreadNum: Integer);
|
||||||
begin
|
begin
|
||||||
Create;
|
Create;
|
||||||
TopFrame.Init(AnAdress, AnArguments, AFunctionName, FileName, FullName, ALine, AState);
|
TopFrame.Init(AnAdress, AnArguments, AFunctionName, FileName, FullName, ALine, AState);
|
||||||
|
FThreadNum := AThreadNum;
|
||||||
FThreadId := AThreadId;
|
FThreadId := AThreadId;
|
||||||
FThreadName := AThreadName;
|
FThreadName := AThreadName;
|
||||||
FThreadState := AThreadState;
|
FThreadState := AThreadState;
|
||||||
@ -2299,9 +2305,10 @@ procedure TThreadEntry.Init(const AnAdress: TDbgPtr;
|
|||||||
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
||||||
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
||||||
const AThreadName: String; const AThreadState: TDbgThreadState;
|
const AThreadName: String; const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState);
|
AState: TDebuggerDataState; AThreadNum: Integer);
|
||||||
begin
|
begin
|
||||||
TopFrame.Init(AnAdress, AnArguments, AFunctionName, FileName, FullName, ALine, AState);
|
TopFrame.Init(AnAdress, AnArguments, AFunctionName, FileName, FullName, ALine, AState);
|
||||||
|
FThreadNum := AThreadNum;
|
||||||
FThreadId := AThreadId;
|
FThreadId := AThreadId;
|
||||||
FThreadName := AThreadName;
|
FThreadName := AThreadName;
|
||||||
FThreadState := AThreadState;
|
FThreadState := AThreadState;
|
||||||
@ -2415,10 +2422,10 @@ function TThreads.CreateEntry(const AnAdress: TDbgPtr;
|
|||||||
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
||||||
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
||||||
const AThreadName: String; const AThreadState: TDbgThreadState;
|
const AThreadName: String; const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState): TThreadEntry;
|
AState: TDebuggerDataState; AThreadNum: Integer): TThreadEntry;
|
||||||
begin
|
begin
|
||||||
Result := TThreadEntry.Create(AnAdress, AnArguments, AFunctionName, FileName,
|
Result := TThreadEntry.Create(AnAdress, AnArguments, AFunctionName, FileName,
|
||||||
FullName, ALine, AThreadId, AThreadName, AThreadState, AState);
|
FullName, ALine, AThreadId, AThreadName, AThreadState, AState, AThreadNum);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TThreads.SetValidity(AValidity: TDebuggerDataState);
|
procedure TThreads.SetValidity(AValidity: TDebuggerDataState);
|
||||||
|
@ -242,6 +242,7 @@ type
|
|||||||
TDbgThread = class(TObject)
|
TDbgThread = class(TObject)
|
||||||
private
|
private
|
||||||
FNextIsSingleStep: boolean;
|
FNextIsSingleStep: boolean;
|
||||||
|
FNum: Integer;
|
||||||
FProcess: TDbgProcess;
|
FProcess: TDbgProcess;
|
||||||
FID: Integer;
|
FID: Integer;
|
||||||
FHandle: THandle;
|
FHandle: THandle;
|
||||||
@ -322,6 +323,7 @@ type
|
|||||||
function IsAtStartOfLine: boolean;
|
function IsAtStartOfLine: boolean;
|
||||||
procedure StoreStepInfo(AnAddr: TDBGPtr = 0);
|
procedure StoreStepInfo(AnAddr: TDBGPtr = 0);
|
||||||
property ID: Integer read FID;
|
property ID: Integer read FID;
|
||||||
|
property Num: Integer read FNum;
|
||||||
property Handle: THandle read FHandle;
|
property Handle: THandle read FHandle;
|
||||||
property Name: String read GetName;
|
property Name: String read GetName;
|
||||||
property NextIsSingleStep: boolean read FNextIsSingleStep write FNextIsSingleStep;
|
property NextIsSingleStep: boolean read FNextIsSingleStep write FNextIsSingleStep;
|
||||||
@ -357,8 +359,11 @@ type
|
|||||||
{ TThreadMap }
|
{ TThreadMap }
|
||||||
|
|
||||||
TThreadMap = class(TMap)
|
TThreadMap = class(TMap)
|
||||||
|
private
|
||||||
|
FNumCounter: integer;
|
||||||
public
|
public
|
||||||
function GetEnumerator: TThreadMapEnumerator;
|
function GetEnumerator: TThreadMapEnumerator;
|
||||||
|
procedure Add(const AId, AData); reintroduce;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Simple array to pass a list of multiple libraries in a parameter. Does
|
// Simple array to pass a list of multiple libraries in a parameter. Does
|
||||||
@ -1098,6 +1103,13 @@ begin
|
|||||||
Result := TThreadMapEnumerator.Create(Self);
|
Result := TThreadMapEnumerator.Create(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TThreadMap.Add(const AId, AData);
|
||||||
|
begin
|
||||||
|
inc(FNumCounter);
|
||||||
|
TDbgThread(AData).FNum := FNumCounter;
|
||||||
|
inherited Add(AId, AData);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TLibraryMapEnumerator }
|
{ TLibraryMapEnumerator }
|
||||||
|
|
||||||
function TLibraryMapEnumerator.GetCurrent: TDbgLibrary;
|
function TLibraryMapEnumerator.GetCurrent: TDbgLibrary;
|
||||||
|
@ -938,7 +938,7 @@ procedure TFpThreadWorkerThreadsUpdate.UpdateThreads_DecRef(Data: PtrInt);
|
|||||||
var
|
var
|
||||||
Threads: TThreadsSupplier;
|
Threads: TThreadsSupplier;
|
||||||
ThreadArray: TFPDThreadArray;
|
ThreadArray: TFPDThreadArray;
|
||||||
i: Integer;
|
i, j: Integer;
|
||||||
CallStack: TDbgCallstackEntryList;
|
CallStack: TDbgCallstackEntryList;
|
||||||
t, n: TThreadEntry;
|
t, n: TThreadEntry;
|
||||||
FpThr: TDbgThread;
|
FpThr: TDbgThread;
|
||||||
@ -950,6 +950,15 @@ begin
|
|||||||
|
|
||||||
if (Threads.CurrentThreads <> nil) then begin
|
if (Threads.CurrentThreads <> nil) then begin
|
||||||
ThreadArray := FpDebugger.FDbgController.CurrentProcess.GetThreadArray;
|
ThreadArray := FpDebugger.FDbgController.CurrentProcess.GetThreadArray;
|
||||||
|
for i := 1 to high(ThreadArray) do begin
|
||||||
|
j := i;
|
||||||
|
while (j > 0) and (ThreadArray[j].Num < ThreadArray[j-1].Num) do begin
|
||||||
|
FpThr := ThreadArray[j];
|
||||||
|
ThreadArray[j] := ThreadArray[j-1];
|
||||||
|
ThreadArray[j-1] := FpThr;
|
||||||
|
dec(j);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
for i := 0 to high(ThreadArray) do begin
|
for i := 0 to high(ThreadArray) do begin
|
||||||
FpThr := ThreadArray[i];
|
FpThr := ThreadArray[i];
|
||||||
ThrState := dtsPaused;
|
ThrState := dtsPaused;
|
||||||
@ -961,21 +970,21 @@ begin
|
|||||||
if Assigned(CallStack) and (CallStack.Count > 0) then begin
|
if Assigned(CallStack) and (CallStack.Count > 0) then begin
|
||||||
c := CallStack.Items[0];
|
c := CallStack.Items[0];
|
||||||
if t = nil then begin
|
if t = nil then begin
|
||||||
n := Threads.CurrentThreads.CreateEntry(c.AnAddress, nil, c.FunctionName, c.SourceFile, '', c.Line, FpThr.ID, FpThr.Name, ThrState);
|
n := Threads.CurrentThreads.CreateEntry(c.AnAddress, nil, c.FunctionName, c.SourceFile, '', c.Line, FpThr.ID, FpThr.Name, ThrState, ddsValid, FpThr.Num);
|
||||||
Threads.CurrentThreads.Add(n);
|
Threads.CurrentThreads.Add(n);
|
||||||
n.Free;
|
n.Free;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
t.Init(c.AnAddress, nil, c.FunctionName, c.SourceFile, '', c.Line, FpThr.ID, FpThr.Name, ThrState);
|
t.Init(c.AnAddress, nil, c.FunctionName, c.SourceFile, '', c.Line, FpThr.ID, FpThr.Name, ThrState, ddsValid, FpThr.Num);
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
if t = nil then begin
|
if t = nil then begin
|
||||||
n := Threads.CurrentThreads.CreateEntry(0, nil, '', '', '', 0, FpThr.ID, FpThr.Name, ThrState);
|
n := Threads.CurrentThreads.CreateEntry(0, nil, '', '', '', 0, FpThr.ID, FpThr.Name, ThrState, ddsValid, FpThr.Num);
|
||||||
Threads.CurrentThreads.Add(n);
|
Threads.CurrentThreads.Add(n);
|
||||||
n.Free;
|
n.Free;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
t.Init(0, nil, '', '', '', 0, FpThr.ID, FpThr.Name, ThrState);
|
t.Init(0, nil, '', '', '', 0, FpThr.ID, FpThr.Name, ThrState, ddsValid, FpThr.Num);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1470,8 +1479,9 @@ end;
|
|||||||
procedure TFPThreads.RequestEntries;
|
procedure TFPThreads.RequestEntries;
|
||||||
var
|
var
|
||||||
ThreadArray: TFPDThreadArray;
|
ThreadArray: TFPDThreadArray;
|
||||||
i: Integer;
|
i, j: Integer;
|
||||||
ThreadEntry: TThreadEntry;
|
ThreadEntry: TThreadEntry;
|
||||||
|
FpThr: TDbgThread;
|
||||||
begin
|
begin
|
||||||
if CurrentThreads = nil then exit;
|
if CurrentThreads = nil then exit;
|
||||||
if Debugger = nil then Exit;
|
if Debugger = nil then Exit;
|
||||||
@ -1480,6 +1490,15 @@ begin
|
|||||||
CurrentThreads.Clear;
|
CurrentThreads.Clear;
|
||||||
|
|
||||||
ThreadArray := TFpDebugDebugger(Debugger).FDbgController.CurrentProcess.GetThreadArray;
|
ThreadArray := TFpDebugDebugger(Debugger).FDbgController.CurrentProcess.GetThreadArray;
|
||||||
|
for i := 1 to high(ThreadArray) do begin
|
||||||
|
j := i;
|
||||||
|
while (j > 0) and (ThreadArray[j].Num < ThreadArray[j-1].Num) do begin
|
||||||
|
FpThr := ThreadArray[j];
|
||||||
|
ThreadArray[j] := ThreadArray[j-1];
|
||||||
|
ThreadArray[j-1] := FpThr;
|
||||||
|
dec(j);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
for i := 0 to high(ThreadArray) do begin
|
for i := 0 to high(ThreadArray) do begin
|
||||||
// TODO: Maybe get the address. If FpDebug has already read the ThreadState.
|
// TODO: Maybe get the address. If FpDebug has already read the ThreadState.
|
||||||
if TFpDebugDebugger(Debugger).FSuspendedThreads.IndexOf(ThreadArray[i].ID) < 0 then
|
if TFpDebugDebugger(Debugger).FSuspendedThreads.IndexOf(ThreadArray[i].ID) < 0 then
|
||||||
|
@ -1648,7 +1648,8 @@ type
|
|||||||
const ALine: Integer;
|
const ALine: Integer;
|
||||||
const AThreadId: Integer; const AThreadName: String;
|
const AThreadId: Integer; const AThreadName: String;
|
||||||
const AThreadState: TDbgThreadState;
|
const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState = ddsValid): TThreadEntry; override;
|
AState: TDebuggerDataState = ddsValid;
|
||||||
|
AThreadNum: Integer = 0): TThreadEntry; override;
|
||||||
procedure SetValidity({%H-}AValidity: TDebuggerDataState); override;
|
procedure SetValidity({%H-}AValidity: TDebuggerDataState); override;
|
||||||
property Entries[const AnIndex: Integer]: TIdeThreadEntry read GetEntry; default;
|
property Entries[const AnIndex: Integer]: TIdeThreadEntry read GetEntry; default;
|
||||||
property EntryById[const AnID: Integer]: TIdeThreadEntry read GetEntryById;
|
property EntryById[const AnID: Integer]: TIdeThreadEntry read GetEntryById;
|
||||||
@ -1676,7 +1677,8 @@ type
|
|||||||
const ALine: Integer;
|
const ALine: Integer;
|
||||||
const AThreadId: Integer; const AThreadName: String;
|
const AThreadId: Integer; const AThreadName: String;
|
||||||
const AThreadState: TDbgThreadState;
|
const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState = ddsValid): TThreadEntry; override;
|
AState: TDebuggerDataState = ddsValid;
|
||||||
|
AThreadNum: Integer = 0): TThreadEntry; override;
|
||||||
procedure SetValidity(AValidity: TDebuggerDataState); override;
|
procedure SetValidity(AValidity: TDebuggerDataState); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5321,10 +5323,10 @@ function TCurrentThreads.CreateEntry(const AnAdress: TDbgPtr;
|
|||||||
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
||||||
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
||||||
const AThreadName: String; const AThreadState: TDbgThreadState;
|
const AThreadName: String; const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState): TThreadEntry;
|
AState: TDebuggerDataState; AThreadNum: Integer): TThreadEntry;
|
||||||
begin
|
begin
|
||||||
Result := inherited CreateEntry(AnAdress, AnArguments, AFunctionName, FileName,
|
Result := inherited CreateEntry(AnAdress, AnArguments, AFunctionName, FileName,
|
||||||
FullName, ALine, AThreadId, AThreadName, AThreadState, AState);
|
FullName, ALine, AThreadId, AThreadName, AThreadState, AState, AThreadNum);
|
||||||
TIdeThreadEntry(Result).FThreadOwner := self;
|
TIdeThreadEntry(Result).FThreadOwner := self;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5579,6 +5581,7 @@ procedure TIdeThreadEntry.SaveDataToXMLConfig(const AConfig: TXMLConfig; const A
|
|||||||
begin
|
begin
|
||||||
TIdeCallStackEntry(TopFrame).SaveDataToXMLConfig(AConfig, APath, AUnitInvoPrv);
|
TIdeCallStackEntry(TopFrame).SaveDataToXMLConfig(AConfig, APath, AUnitInvoPrv);
|
||||||
AConfig.SetValue(APath + 'ThreadId', ThreadId);
|
AConfig.SetValue(APath + 'ThreadId', ThreadId);
|
||||||
|
AConfig.SetValue(APath + 'ThreadNum', ThreadNum);
|
||||||
AConfig.SetValue(APath + 'ThreadName', ThreadName);
|
AConfig.SetValue(APath + 'ThreadName', ThreadName);
|
||||||
AConfig.SetValue(APath + 'ThreadState', ThreadState, TypeInfo(TDbgThreadState));
|
AConfig.SetValue(APath + 'ThreadState', ThreadState, TypeInfo(TDbgThreadState));
|
||||||
end;
|
end;
|
||||||
@ -5636,10 +5639,10 @@ function TIdeThreads.CreateEntry(const AnAdress: TDbgPtr;
|
|||||||
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
const AnArguments: TStrings; const AFunctionName: String; const FileName,
|
||||||
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
FullName: String; const ALine: Integer; const AThreadId: Integer;
|
||||||
const AThreadName: String; const AThreadState: TDbgThreadState;
|
const AThreadName: String; const AThreadState: TDbgThreadState;
|
||||||
AState: TDebuggerDataState): TThreadEntry;
|
AState: TDebuggerDataState; AThreadNum: Integer): TThreadEntry;
|
||||||
begin
|
begin
|
||||||
Result := TIdeThreadEntry.Create(AnAdress, AnArguments, AFunctionName, FileName,
|
Result := TIdeThreadEntry.Create(AnAdress, AnArguments, AFunctionName, FileName,
|
||||||
FullName, ALine, AThreadId, AThreadName, AThreadState, AState);
|
FullName, ALine, AThreadId, AThreadName, AThreadState, AState, AThreadNum);
|
||||||
TIdeThreadEntry(Result).FThreadOwner := self;
|
TIdeThreadEntry(Result).FThreadOwner := self;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -144,7 +144,10 @@ begin
|
|||||||
if Threads[i].ThreadId = Threads.CurrentThreadId
|
if Threads[i].ThreadId = Threads.CurrentThreadId
|
||||||
then lvThreads.Items[i].ImageIndex := imgCurrentLine
|
then lvThreads.Items[i].ImageIndex := imgCurrentLine
|
||||||
else lvThreads.Items[i].ImageIndex := -1;
|
else lvThreads.Items[i].ImageIndex := -1;
|
||||||
lvThreads.Items[i].SubItems[0] := IntToStr(Threads[i].ThreadId);
|
if Threads[i].ThreadNum > 0 then
|
||||||
|
lvThreads.Items[i].SubItems[0] := IntToStr(Threads[i].ThreadNum) + ': ' + IntToStr(Threads[i].ThreadId)
|
||||||
|
else
|
||||||
|
lvThreads.Items[i].SubItems[0] := IntToStr(Threads[i].ThreadId);
|
||||||
lvThreads.Items[i].SubItems[1] := Threads[i].ThreadName;
|
lvThreads.Items[i].SubItems[1] := Threads[i].ThreadName;
|
||||||
lvThreads.Items[i].SubItems[2] := THREAD_STATE_NAMES[Threads[i].ThreadState];
|
lvThreads.Items[i].SubItems[2] := THREAD_STATE_NAMES[Threads[i].ThreadState];
|
||||||
s := Threads[i].TopFrame.Source;
|
s := Threads[i].TopFrame.Source;
|
||||||
@ -194,7 +197,10 @@ var
|
|||||||
begin
|
begin
|
||||||
Item := lvThreads.Selected;
|
Item := lvThreads.Selected;
|
||||||
if Item = nil then exit;
|
if Item = nil then exit;
|
||||||
id := StrToIntDef(Item.SubItems[0], -1);
|
if TIdeThreadEntry(Item.Data) <> nil then
|
||||||
|
id := TIdeThreadEntry(Item.Data).ThreadId
|
||||||
|
else
|
||||||
|
id := StrToIntDef(Item.SubItems[0], -1);
|
||||||
if id < 0 then exit;
|
if id < 0 then exit;
|
||||||
if GetSelectedSnapshot = nil
|
if GetSelectedSnapshot = nil
|
||||||
then ThreadsMonitor.ChangeCurrentThread(id)
|
then ThreadsMonitor.ChangeCurrentThread(id)
|
||||||
|
Loading…
Reference in New Issue
Block a user