[Lazarus] avr, fpdebug and dwarf

Martin Frb lazarus at mfriebe.de
Mon Jun 10 01:13:04 CEST 2019


On 10/06/2019 01:05, Martin Frb via lazarus wrote:
>
>
> Note, that currently access to StackPointer/Base and 
> InstructionPointer are hardcoded in other units too (using either the 
> intel name, or the dwarf reg num for intel)
> So that needs to be fixed...
I.e. you find code like

         if AController.CurrentProcess.Mode=dm32 then
           Reg := RegList.FindRegisterByDwarfIndex(8)
         else
           Reg := RegList.FindRegisterByDwarfIndex(16);

(evaluating the stack)

RegList should have methods:
.GetStackBase
.GetInstructionPointer

And reading the stack, may have to be moved to OS/CPU specific classes, 
if stack-frame layout may differ.



More information about the lazarus mailing list