[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] Re: Simulavr / clock
From: |
Theodore A. Roth |
Subject: |
Re: [Simulavr-devel] Re: Simulavr / clock |
Date: |
Wed, 11 Feb 2004 13:21:40 -0800 (PST) |
On Wed, 11 Feb 2004, Keith Gudger wrote:
> Ted:
>
> I really meant the first one. That's in gdb, I see.
Just to clarify, when I say gdb, I'm talking about The source for GNU
gdb as a separate program from simulavr. All information passed from
simulavr to gdb goes through gdb's remote serial protocol (RSP) which
has some constraints as to what gets sent.
When you give gdb the 'p $r21' command, it will send a RSP packet to
simulavr asking for the value of register 21. Gdb explicitly knows about
r0-r31, SREG, PC and SP.
Gdb doesn't know anything about io registers unless the target (simulavr
or avarice) can tell it about them (thus providing the 'info
io_registers' command which is avr specific).
> Is gdb where "avr_core_CK_get()" resides, too?
No. That's a simulavr function which gdb doesn't know anything about.
> I think I understand now, so I'll leave everything as it is....
Hope the clears things up a bit more.
Ted Roth
>
> Keith
>
> On Wed, 11 Feb 2004, Theodore A. Roth wrote:
>
> >
> >
> > On Wed, 11 Feb 2004, Keith Gudger wrote:
> >
> > >
> > > On Wed, 11 Feb 2004, Theodore A. Roth wrote:
> > >
> > > > >
> > > > > I'm going to look into the "named registers" which get returned with
> > > > > an
> > > > > "info all-registers". Could I put the cpu clock into some such
> > > > > register
> > > > > so that gdb can find it and print it with "p $r21" style?
> > > >
> > > > I'm not sure that this should go into gdb. When you are running gdb
> > > > using avarice/jtagice as a back end, there is no way that I know of to
> > > > get clock information. Also, gdb with avarice is slow enough as it is
> > > > and something like this could slow it down even more.
> > > >
> > >
> > > Ted:
> > >
> > > What I meant was adding a "cpu_clock" register to simulavr. I thought the
> > > definitions of the registers were in simulavr, not gdb, so if I'm wrong, I
> > > won't bother. Thanks anyway.
> >
> > Maybe I'm confused...
> >
> > There are two register sets in gdb. The r0-r31+SP+SREG+PC+FP set and the
> > IO register set. The "p $r21" type command will only work with the first
> > set. The IO set is something I hacked in to pass IO register names up to
> > GDB.
> >
> > The first set is what I thought you were talking about in my previous
> > email. Looks like you were really talking about the second set.
> >
> > You may be able to add something to simulavr that would allow getting
> > the clock via something like this:
> >
> > (gdb) info clock
> >
> > That would require a hack to avr-tdep.c in gdb though.
> >
> > Ted Roth
> >
>
>
>