This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: gdb stub execute check
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Yoshinori Sato <qzb04471 at nifty dot ne dot jp>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 18 Oct 2002 04:56:21 +0100
- Subject: Re: [ECOS] gdb stub execute check
- References: <m23cr5jb4s.wl@sakura.zive.net>
Yoshinori Sato wrote:
Will not there be a method to judge to be it from target program whether
gdb stub becomes active?
This is tricky, because a RAM loaded program may be communicating with the
ROM for all its services. Only the ROM knows if a stub is present and if,
for example, it is using the GDB channel as the console/debug channel.
The best you can do probably is use the hal_if.h functions to detect if
the currently selected channel is the GDB "mangler". Do this by calling
CYGACC_CALL_IF_SET_DEBUG_COMM( CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT );
and looking at the return code to see if it is
CYGNUM_CALL_IF_SET_COMM_ID_MANGLER.
But if the user isn't connected to a debugger, that's not the same thing
as *whether* there is a stub.
When gdb stub works when I output a message in serial port, I want to
output it with protocol of gdb.
This should happen automatically when you connect via GDB in the first
place. To force it later, set the debug channel (as above) and/or possibly
your console channel, depending on your CDL config and what you're exactly
trying to achieve, to the mangler channel ID (
CYGNUM_CALL_IF_SET_COMM_ID_MANGLER ).
Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss