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