[ECOS] Why gdb don't response diag_printf?

Jonathan Larmour jifl@eCosCentric.com
Thu Mar 27 22:07:00 GMT 2003

Water He wrote:
> Firstly, I built a libtarget.a, and linked it with my hello.o to a elf file.
> My target board is running a vxWorks boot program, there are not GDB stub in it. It can fetch a elf file from my host via FTP. once boot program gets elf file,  it execute it. so my ecos application can be loaded.
> I want to know: Whether I must make a Redboot and burn it to board flash if I want to use GDB to debug.

Ah ok, now I see. What you need to do is include GDB stubs in your 
application by enabling CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS in the HAL 
configuration (and rebuild eCos obviously). All RedBoot is is an eCos 
application with GDB stubs included.

If you want your program to stop and wait after running it so that you 
have time to connect with GDB, you can insert a call to the function:
which will make it stop, although you'll have to set $pc by hand to step 
past the breakpoint instruction. The GDB command:
  set $pc=$pc+4
at a guess would do that.

eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "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

More information about the Ecos-discuss mailing list