Is it correct for avr that the exe is loaded at very low addressed? 0x011a ?
----------------
* Ensure you compile with -O- (optimization 0 / none).
Even -O1 can screw up.
* You may want to try to switch between dwarf(2) and stabs, if there are issues, this may help (project options/debug)
* If avail, older gdb. (on some platforms (win) gdb got worse above version 7.7)
----------------
My expertise is only about the IDE integration (communication to gdb).
* If the error is broken debug info by fpc or the linker, then that needs to be discussed with someone from the fpc team (fpc mail list). So it will be hard to tell if it is fpc or gdb.
* If the error is in gdb, then all you can try is a diff version of gdb
In both cases stabs vs dwarf may help.
----------------
As for the watch:
<-data-evaluate-expression A>
^done,value="12090"
(gdb)
If gdb is returning the wrong value, then there is nothing the IDE can do.
Either gdb is at fault, or fpc generated bad debug info, or the linker messed it up.
--------
Disassembler:
How or why this affects the disassembler is not clear.
Please try (avr only)
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_sessionThis includes the state of the IDE, so it gives some more info.
Change the --debug-enable option to:
--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO,DBG_DISASSEMBLER,DBG_LOCATION_INFO,DBG_BREAKPOINT,DBGMI_WITH_DISASS_OVERFLOW,DBG_EVENTS