mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:09:28 +02:00
LazDebuggerFp: Added Comments for handling FpcSpecific data
This commit is contained in:
parent
9519a967ca
commit
28d1437b17
@ -2417,7 +2417,7 @@ var
|
||||
o, i: Integer;
|
||||
EFlags, Cnt: Cardinal;
|
||||
Frames: TFrameList;
|
||||
FinallyData: Array of array [0..3] of DWORD;
|
||||
FinallyData: Array of array [0..3] of DWORD; //TScopeRec
|
||||
n: String;
|
||||
begin
|
||||
case AnEventType of
|
||||
@ -2552,6 +2552,15 @@ begin
|
||||
|
||||
(* TODO: Look at using DW_TAG_try_block https://bugs.freepascal.org/view.php?id=34881 *)
|
||||
|
||||
(* Get parm in RCX:
|
||||
EXCEPTION_RECORD = record
|
||||
ExceptionCode : DWORD;
|
||||
ExceptionFlags : DWORD;
|
||||
ExceptionRecord : ^_EXCEPTION_RECORD;
|
||||
ExceptionAddress : PVOID;
|
||||
NumberParameters : DWORD;
|
||||
ExceptionInformation : array[0..(EXCEPTION_MAXIMUM_PARAMETERS)-1] of ULONG_PTR;
|
||||
end; *)
|
||||
{$PUSH}{$Q-}{$R-}
|
||||
Rcx := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(2).NumValue; // rec: TExceptionRecord
|
||||
{$PUSH}{$Q-}{$R-}
|
||||
@ -2561,6 +2570,7 @@ begin
|
||||
exit;
|
||||
{$POP}
|
||||
|
||||
(* Get FrameBasePointe (RPB) for finally block (passed in R8) *)
|
||||
R8 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(8).NumValue;
|
||||
if (not CurrentProcess.ReadAddress(R8 + 160, Base)) or (Base = 0) then // RPB at finally
|
||||
exit;
|
||||
@ -2569,10 +2579,20 @@ begin
|
||||
then
|
||||
exit;
|
||||
|
||||
// R9 = dispatch: TDispatcherContext
|
||||
R9 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(9).NumValue;
|
||||
//dispatch.HandlerData
|
||||
if (not CurrentProcess.ReadAddress(R9 + 56, HData)) or (HData = 0) then
|
||||
exit;
|
||||
(* HandlerData = MaxScope: DWord, array of ^TScopeRec
|
||||
TScopeRec=record
|
||||
Typ: DWord; { SCOPE_FINALLY: finally code in RvaHandler
|
||||
SCOPE_CATCHALL: unwinds to RvaEnd, RvaHandler is the end of except block
|
||||
SCOPE_IMPLICIT: finally code in RvaHandler, unwinds to RvaEnd
|
||||
otherwise: except with 'on' stmts, value is RVA of filter data }
|
||||
RvaStart: DWord;
|
||||
RvaEnd: DWord;
|
||||
RvaHandler: DWord; *)
|
||||
if (not CurrentProcess.ReadData(HData, 4, Cnt)) or (Cnt = 0) or (Cnt > MaxFinallyHandlerCnt) then
|
||||
exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user