mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 00:11:51 +02:00
FpDebug: EXCEPTION_SET_THREADNAME check for thread-id. Issue #40699
This commit is contained in:
parent
8f5e5b262b
commit
7f8267f283
@ -1340,13 +1340,15 @@ begin
|
|||||||
if not ReadString(TDbgPtr(MDebugEvent.Exception.ExceptionRecord.ExceptionInformation[1]), 200, threadname) then
|
if not ReadString(TDbgPtr(MDebugEvent.Exception.ExceptionRecord.ExceptionInformation[1]), 200, threadname) then
|
||||||
threadname := 'error getting threadname';
|
threadname := 'error getting threadname';
|
||||||
t := AThread;
|
t := AThread;
|
||||||
if (MDebugEvent.Exception.ExceptionRecord.NumberParameters >= 3) and
|
with MDebugEvent.Exception.ExceptionRecord do begin
|
||||||
(MDebugEvent.Exception.ExceptionRecord.ExceptionInformation[2] <> 0) and
|
if (NumberParameters >= 3) and
|
||||||
(MDebugEvent.Exception.ExceptionRecord.ExceptionInformation[2] <> INVALID_HANDLE_VALUE)
|
(TThreadID(ExceptionInformation[2]) <> 0) and
|
||||||
|
(TThreadID(ExceptionInformation[2]) <> TThreadID(-1))
|
||||||
then begin
|
then begin
|
||||||
if not GetThread(Integer(MDebugEvent.Exception.ExceptionRecord.ExceptionInformation[2]), t) then
|
if not GetThread(Integer(ExceptionInformation[2]), t) then
|
||||||
t := nil;
|
t := nil;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
if t <> nil then begin
|
if t <> nil then begin
|
||||||
with TDbgWinThread(t) do begin
|
with TDbgWinThread(t) do begin
|
||||||
FName := threadname;
|
FName := threadname;
|
||||||
|
Loading…
Reference in New Issue
Block a user