mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:19:18 +02:00
LazDebuggerFp: Trigger DefaultContext in thread to cache it. (Avoid calling GetInstructionPointerRegisterValue outside the debug-thread)
(cherry picked from commit 24c378f797
)
This commit is contained in:
parent
357120fb44
commit
7667dc1bad
@ -2411,6 +2411,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
FDebugger.FDbgController.DefaultContext; // Make sure it is avail and cached / so it can be called outside the thread
|
||||||
|
|
||||||
if CurrentThread = nil then
|
if CurrentThread = nil then
|
||||||
exit;
|
exit;
|
||||||
@ -3810,7 +3811,8 @@ begin
|
|||||||
result.SrcLine:=0;
|
result.SrcLine:=0;
|
||||||
|
|
||||||
if AnAddress=0 then
|
if AnAddress=0 then
|
||||||
result.Address := FDbgController.CurrentThread.GetInstructionPointerRegisterValue
|
result.Address := FDbgController.DefaultContext.Address // DefaultContext has the InstrPtr cached
|
||||||
|
//result.Address := FDbgController.CurrentThread.GetInstructionPointerRegisterValue
|
||||||
else
|
else
|
||||||
result.Address := AnAddress;
|
result.Address := AnAddress;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user