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

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

RE: [avr-gcc-list] port access with avr-gdb


From: Dave Hylands
Subject: RE: [avr-gcc-list] port access with avr-gdb
Date: Sun, 13 Jun 2004 07:23:41 -0700

One way to get the registers to show up symbolically, is to create a structure 
which has the same layout as the registers. Then you can access through a null 
pointer. This would allow you to see the registers in GDB. They still wouldn't 
show up I nthe linker map though.

There are ways of making them show up in the linker map too. Just create an asm 
file which has each of the registers named. On the C side you'd have 
appropriate externs decalred.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/ 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On Behalf Of GOUY Yann
> Sent: Sunday, June 13, 2004 5:50 AM
> To: address@hidden
> Subject: Re: [avr-gcc-list] port access with avr-gdb
> 
> 
> Le sam 12/06/2004 à 14:15, Rob MacLachlan a écrit :
> > Yes. it is possible to set I/O registers directly using 
> GDB, but it's 
> > a
> > pain because the port location and format info is #defines 
> in header 
> > files, and is not known to GDB.  For this reason, I've 
> never done this 
> > other than as an experiment.  In comparison to the register 
> browser of 
> > AVRStudio, this is rather lacking.  You have to convert the 
> I/O register 
> >   number into a data space address, cast it to an 
> appropriate type, then 
> > assign to it.
> > 
> > I thought of writing some tool to translate the header file 
> into a gdb
> > script as a way to get this info into gdb, but never did.  
> I suppose a 
> > better solution would be to get this imported as symbol 
> table info somehow.
> > 
> 
> it seems to me that the registers don't appear in the symbol table.
> if you take a look at the .lst file, you'll see accesses to
> memory-mapped registers aren't decoded with the name of the registers.
> 
> regards.
> 
>       Yann
> 
> >    Rob
> > 
> > _______________________________________________
> > avr-gcc-list mailing list
> > address@hidden
> > http://www.avr1.org/mailman/listinfo/avr-gcc-list
> 
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
> 
> 



reply via email to

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