> -----Original Message----- > From: > avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu.org > [mailto:avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu. > org] On Behalf Of Miguel > Sent: Saturday, February 07, 2009 11:07 AM > To: avr-gcc-list@nongnu.org > Subject: [avr-gcc-list] Debugging problem with gdb-avr. > > Hi to all, > > 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? > > > I compile with: > avr-gcc -g -mmcu=atmega16 -c hello.c;avr-gcc -g > -mmcu=atmega16 -o hello.elf hello.o;avr-objcopy -j .text -j > .data -O ihex hello.elf hello.hex
I don't know how your avr-gcc is built and what is its native debugging format is. Could you try replacing the switch -g above with -gstabs? See if that helps first. Eric _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list