[Lazarus] avr, fpdebug and dwarf
Martin Frb
lazarus at mfriebe.de
Mon Jun 10 01:05:25 CEST 2019
On 09/06/2019 18:16, Dimitrios Chr. Ioannidis wrote:
> Hi,
>
> I managed to use an official AVR debugger ( AVR Dragon ) with an
> official gdb-bridge ( Atmel Studio's atbackend.exe ) and I can start a
> debugging session from Lazarus, using a avr-gdb 8.3 ( or the official
> gdb from the Microchip (Atmel) AVR Toolchain ).
>
> But what am I seeing ( see attached screenshot ) makes me to believe
> that fpdebug ( either dwarf 2 or dwarf 3 the results is the same )
> doesn't know ( needs to know ? ... ) how to interpret the avr platform
> /architecture . Am I correct in my assumption ?
>
> What is your opinion ?
Yes, fpdebug currently only knows intel.
I assume, this is a linux based platform?
components\fpdebug\fpdbglinuxclasses.pas TDbgLinuxThread.ReadThreadState
And anything that then accesses the registers.
Registers need to be stored with the correct dwarf index. The index is
used when reading any register based data (including any data relative
to the stack / i.e. local var)
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...
The disassemble currently only does intel too.
Not sure if stepping relies on this. (i.e. identifying "call" instructions)
Stepping needs to be reworked anyway.
More information about the lazarus
mailing list