avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Debugging problem with gdb-avr.


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Debugging problem with gdb-avr.
Date: Sat, 7 Feb 2009 11:19:27 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Miguel
> Sent: Saturday, February 07, 2009 11:07 AM
> To: address@hidden
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]