This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB stubs question


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
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]