I wanna debug an AVR program with avr-gdb while using simulavr as the simulator, as long as I'm not using ddd, things work, but once I use ddd for some graphical interface, as I'm new to gdb, the simulavr crashes. Here is what happens:
$ simulavr -d atmega8 -f main.elf -g
Waiting on port 1212 for gdb client to connect...
$ ddd --debugger "avr-gdb main.elf"
in the gdb command line inside ddd:
(gdb) target remote localhost:1212
warning: Can not parse XML target description; XML support was disabled at compile time
0x00000000 in __vectors ()
(gdb) load
Loading section .text, size 0x540 lma 0x0
Loading section .eeprom, size 0x200 lma 0x810000
Start address 0x0, load size 1856
Transfer rate: 453 KB/sec, 618 bytes/write.
(gdb) step
Single stepping until exit from function __vectors,
which has no line number information.
0x00000026 in __trampolines_start ()
(gdb)
as soon as I step
, simulavr crashes like this:
.
.
.
WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x51], PC=0x26
WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x56], PC=0x26
WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x5c], PC=0x26
simulavr: hwstack.cpp:282: void ThreadList::OnSPRead(int): Assertion `0 != SP_value' failed.
Aborted (core dumped)
ddd version: 3.3.12
avr-gdb version: 7.2
simulavr version: 1.0.0
Thanks