mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 14:00:41 +02:00
LazDebuggerFp: Trigger DefaultContext in thread to cache it. (Avoid calling GetInstructionPointerRegisterValue outside the debug-thread)
This commit is contained in:
parent
12b1484637
commit
24c378f797
@ -2424,6 +2424,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
FDebugger.FDbgController.DefaultContext; // Make sure it is avail and cached / so it can be called outside the thread
|
||||
|
||||
if CurrentThread = nil then
|
||||
exit;
|
||||
@ -3823,7 +3824,8 @@ begin
|
||||
result.SrcLine:=0;
|
||||
|
||||
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
|
||||
result.Address := AnAddress;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user