This is the mail archive of the ecos-discuss@sources.redhat.com 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: Why gdb don't response diag_printf?


Water He wrote:
> HI, I am using ecos current in our MPC8260 board. my board use a
> vxWorks boot image and a SMC as serial port. so I compile my HelloWorld
> program to an elf file. And it can be loaded via FTP by vxWorks boot
> image correctly. I can use printf output message to the console port.
> 
> But now problem is: When I use diag_printf, it will stop there and
> can't connect with GDB.

It's still not clear what you are doing.... you load the application via
FTP, not load a GDB stub, correct? And then you run the application and
_then_ connect via GDB? How exactly do you do that?

> Firstly, I open HyperTerminal. I notice that it
> is waiting a input character '+'. If I press key '+', it output a
> string like
> "$O546872656164205B5461736B5F425D3A283030303030303139293A2064656C617920333832207469636B730A#A6"
> and stop at this diag_printf and wait next '+'.

That's program output encoded in GDB remote protocol format. '+' is the
acknowledgement character normally sent by GDB to the program.

> I decode previous
> string and find out they are what I want to output. If I close
> HyperTerminal, and start up powerpc-eabi-gdb #powerpc-eabi-gdb --nw
> hello.exe (gdb)set remotebaud 9600 (gdb)target remote com2 Remote
> debugging using com2 Ignoring packet error, continuing... Ignoring
> packet error, continuing... Ignoring packet error, continuing... 
> Couldn't establish connection to remote target Malformed response to
> offset query, timeout
> 
> I don't know why GDB don't send '+'. Or I miss some operation? How can
> I?

The program should be stopped when you try and connect. GDB can't connect
to a running program.

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


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