I´m trying to program and debug an atmega16, with Avarice, gcc-avr and gdb-avr with JTAG, using the avr Dragon device.
I can program the target correctly and the code works fine in it.
my problems come when I debug by using functions(besides the main),
the allocations to the registers don´t happen correctly, and the steps are not in the correct order.
if I put all the code in the main function, the debug seems ok.
I suspect that the problem is in gdb-avr.
Anyone has had any problems about the same issue?