public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* GDB stubs question
@ 2007-02-06 12:40 Lars Poeschel
  2007-02-06 12:43 ` Gary Thomas
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Poeschel @ 2007-02-06 12:40 UTC (permalink / raw)
  To: ecos-devel

Hi!

I am trying to port eCos/Redboot to a new architecture. I am up to 
implementing GDB stubs now. Is there a list of functions which have to be 
implemented minimally ?
For the macros HAL_GET_GDB_REGISTERS() and HAL_SET_GDB_REGISTERS() the 
reference manual says they should translate between HAL_SavedRegisters and 
a "GDB array". Where do I know the layout of this "GDB array" from ?

Thanks,

Lars

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stubs question
  2007-02-06 12:40 GDB stubs question Lars Poeschel
@ 2007-02-06 12:43 ` Gary Thomas
  2007-02-06 13:07   ` Lars Poeschel
  0 siblings, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2007-02-06 12:43 UTC (permalink / raw)
  To: Lars Poeschel; +Cc: ecos-devel

Lars Poeschel wrote:
> Hi!
> 
> I am trying to port eCos/Redboot to a new architecture. I am up to 
> implementing GDB stubs now. Is there a list of functions which have to be 
> implemented minimally ?
> For the macros HAL_GET_GDB_REGISTERS() and HAL_SET_GDB_REGISTERS() the 
> reference manual says they should translate between HAL_SavedRegisters and 
> a "GDB array". Where do I know the layout of this "GDB array" from ?

The GDB sources, I'm afraid.

What's the architecture?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stubs question
  2007-02-06 12:43 ` Gary Thomas
@ 2007-02-06 13:07   ` Lars Poeschel
  2007-02-06 13:15     ` Gary Thomas
       [not found]     ` <1170786685.4237.38.camel@sadr.localdomain>
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Poeschel @ 2007-02-06 13:07 UTC (permalink / raw)
  To: ecos-devel; +Cc: Gary Thomas

Am Dienstag, 6. Februar 2007 13:43 schrieb Gary Thomas:
> Lars Poeschel wrote:
> > Hi!
> >
> > I am trying to port eCos/Redboot to a new architecture. I am up to
> > implementing GDB stubs now. Is there a list of functions which have to be
> > implemented minimally ?
> > For the macros HAL_GET_GDB_REGISTERS() and HAL_SET_GDB_REGISTERS() the
> > reference manual says they should translate between HAL_SavedRegisters
> > and a "GDB array". Where do I know the layout of this "GDB array" from ?
>
> The GDB sources, I'm afraid.

Why afraid ?

I am not sure, because HAL_SavedRegisters is per thread structure and GDB 
seems to deal only with function call frames (struct frame_saved_regs). Is it 
the same for that case ?

> What's the architecture?

It is Fujitsu FR30.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stubs question
  2007-02-06 13:07   ` Lars Poeschel
@ 2007-02-06 13:15     ` Gary Thomas
  2007-02-07  0:16       ` Lars Poeschel
       [not found]     ` <1170786685.4237.38.camel@sadr.localdomain>
  1 sibling, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2007-02-06 13:15 UTC (permalink / raw)
  To: Lars Poeschel; +Cc: ecos-devel

Lars Poeschel wrote:
> Am Dienstag, 6. Februar 2007 13:43 schrieb Gary Thomas:
>> Lars Poeschel wrote:
>>> Hi!
>>>
>>> I am trying to port eCos/Redboot to a new architecture. I am up to
>>> implementing GDB stubs now. Is there a list of functions which have to be
>>> implemented minimally ?
>>> For the macros HAL_GET_GDB_REGISTERS() and HAL_SET_GDB_REGISTERS() the
>>> reference manual says they should translate between HAL_SavedRegisters
>>> and a "GDB array". Where do I know the layout of this "GDB array" from ?
>> The GDB sources, I'm afraid.
> 
> Why afraid ?

Just because you have to go lumbering through the code to figure it out.

> 
> I am not sure, because HAL_SavedRegisters is per thread structure and GDB 
> seems to deal only with function call frames (struct frame_saved_regs). Is it 
> the same for that case ?

That's what the macros are for :-)  The CPU only understands CPU state (registers),
but this is duplicated across each thread in eCos.  The macros take the state of
the current thread/environment and put it into a form well known to GDB.  When
the thread is to be resumed, then GDB passes back the well formed state and the
macro needs to put that back into the appropriate thread information.

> 
>> What's the architecture?
> 
> It is Fujitsu FR30.

How different is it from the FRV400 (already in eCos)?  You
might get some pointers by looking at that HAL.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stubs question
  2007-02-06 13:15     ` Gary Thomas
@ 2007-02-07  0:16       ` Lars Poeschel
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Poeschel @ 2007-02-07  0:16 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-devel

> >> What's the architecture?
> >
> > It is Fujitsu FR30.
>
> How different is it from the FRV400 (already in eCos)?  You
> might get some pointers by looking at that HAL.

Unfortunately FR30 and FRV do not have too much in common, but looking at FRV 
eCos port at that point gives me a good idea how it works and how it should 
look like.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stubs question
       [not found]     ` <1170786685.4237.38.camel@sadr.localdomain>
@ 2007-02-07  0:18       ` Lars Poeschel
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Poeschel @ 2007-02-07  0:18 UTC (permalink / raw)
  To: Mark Salter; +Cc: ecos-devel, Gary Thomas

Am Dienstag, 6. Februar 2007 19:31 schrieb Mark Salter:
> On Tue, 2007-02-06 at 14:07 +0100, Lars Poeschel wrote:
> > It is Fujitsu FR30.
>
> That's a blast from the past. I wrote some gdb stub support for FR30
> back in 1998/99. Here are some sources you may find useful.

Thanks a lot!!
This is indeed very useful for me!

Lars

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-07  0:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06 12:40 GDB stubs question Lars Poeschel
2007-02-06 12:43 ` Gary Thomas
2007-02-06 13:07   ` Lars Poeschel
2007-02-06 13:15     ` Gary Thomas
2007-02-07  0:16       ` Lars Poeschel
     [not found]     ` <1170786685.4237.38.camel@sadr.localdomain>
2007-02-07  0:18       ` Lars Poeschel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).