mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:49:15 +02:00
FpDebugger (pure): The dx-register is used to obtain the location of an exception. Fix for the difference in the dwarf-index of the dx-register on i386 and x86_64.
git-svn-id: trunk@45429 -
This commit is contained in:
parent
1b1997f370
commit
fda010dfd1
@ -1080,9 +1080,17 @@ var
|
||||
AnExceptionObjectLocation: TDBGPtr;
|
||||
ExceptionClass: string;
|
||||
ExceptionMessage: string;
|
||||
RegDxDwarfIndex: byte;
|
||||
begin
|
||||
// Using regvar:
|
||||
AnExceptionLocation:=GetLocationRec(FDbgController.CurrentProcess.MainThread.RegisterValueList.FindRegisterByDwarfIndex(2).NumValue);
|
||||
// In all their wisdom, people decided to give the (r)dx register dwarf index
|
||||
// 1 on for x86_64 and index 2 for i386.
|
||||
if FDbgController.CurrentProcess.Mode=dm32 then
|
||||
RegDxDwarfIndex:=2
|
||||
else
|
||||
RegDxDwarfIndex:=1;
|
||||
|
||||
AnExceptionLocation:=GetLocationRec(FDbgController.CurrentProcess.MainThread.RegisterValueList.FindRegisterByDwarfIndex(RegDxDwarfIndex).NumValue);
|
||||
AnExceptionObjectLocation:=FDbgController.CurrentProcess.MainThread.RegisterValueList.FindRegisterByDwarfIndex(0).NumValue;
|
||||
ExceptionClass := GetClassInstanceName(AnExceptionObjectLocation);
|
||||
ExceptionMessage := ReadAnsiString(AnExceptionObjectLocation+DBGPTRSIZE[FDbgController.CurrentProcess.Mode]);
|
||||
|
Loading…
Reference in New Issue
Block a user