mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 04:19:09 +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;
|
o, i: Integer;
|
||||||
EFlags, Cnt: Cardinal;
|
EFlags, Cnt: Cardinal;
|
||||||
Frames: TFrameList;
|
Frames: TFrameList;
|
||||||
FinallyData: Array of array [0..3] of DWORD;
|
FinallyData: Array of array [0..3] of DWORD; //TScopeRec
|
||||||
n: String;
|
n: String;
|
||||||
begin
|
begin
|
||||||
case AnEventType of
|
case AnEventType of
|
||||||
@ -2552,6 +2552,15 @@ begin
|
|||||||
|
|
||||||
(* TODO: Look at using DW_TAG_try_block https://bugs.freepascal.org/view.php?id=34881 *)
|
(* 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-}
|
{$PUSH}{$Q-}{$R-}
|
||||||
Rcx := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(2).NumValue; // rec: TExceptionRecord
|
Rcx := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(2).NumValue; // rec: TExceptionRecord
|
||||||
{$PUSH}{$Q-}{$R-}
|
{$PUSH}{$Q-}{$R-}
|
||||||
@ -2561,6 +2570,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
{$POP}
|
{$POP}
|
||||||
|
|
||||||
|
(* Get FrameBasePointe (RPB) for finally block (passed in R8) *)
|
||||||
R8 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(8).NumValue;
|
R8 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(8).NumValue;
|
||||||
if (not CurrentProcess.ReadAddress(R8 + 160, Base)) or (Base = 0) then // RPB at finally
|
if (not CurrentProcess.ReadAddress(R8 + 160, Base)) or (Base = 0) then // RPB at finally
|
||||||
exit;
|
exit;
|
||||||
@ -2569,10 +2579,20 @@ begin
|
|||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
// R9 = dispatch: TDispatcherContext
|
||||||
R9 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(9).NumValue;
|
R9 := CurrentThread.RegisterValueList.FindRegisterByDwarfIndex(9).NumValue;
|
||||||
//dispatch.HandlerData
|
//dispatch.HandlerData
|
||||||
if (not CurrentProcess.ReadAddress(R9 + 56, HData)) or (HData = 0) then
|
if (not CurrentProcess.ReadAddress(R9 + 56, HData)) or (HData = 0) then
|
||||||
exit;
|
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
|
if (not CurrentProcess.ReadData(HData, 4, Cnt)) or (Cnt = 0) or (Cnt > MaxFinallyHandlerCnt) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user