Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - program debugging: (8 Items)
   
program debugging  
Hi,
I'm learning how to debug code in Momentics. I'm using MIPS architecture, 
and created a hello world project.  I tried to use Momentics Debugger, 
download and debug code,  first I created a QNX Target System Project, 
created a launch configuration, then click debug,  I got the following,

--------------------------
Console window:

MsgNak received - resending
Timed out
MsgNak received - resending

--------------------------
Debugger window:

test [C/C++ QNX QConn (IP)]
/tmp/hellolic1202164620890 on Cap-M pid 188426 (2/4/08 2:37 PM)
<terminated, exit value: 
3840>c:\QNX632\host\win32\x86\usr\bin\ntomips-gdb.exe(2/4/08 2:37 PM)

--------------------------
eventually pop up a  window, shows:

Attemp to connect to the target 'Cap-M' failed.
Target is not responding (timed out)



In the target, I saw the pid 188426 for a moment, then disappeared.
Please advise. 

Thanks
Mei
RE: program debugging  
Looks like it could not launch debugger on the target...
Does you target have pdebug program installed? Do you run qconn program as
root?
Re: RE: program debugging  
qconn(IP) was built-in in the BSP, and it is invoked automatically. Do I have to run qdebug also?
Re: RE: program debugging  
Please make sure your BSP has the "pdebug" program built in. It's required to do remote process level debugging. You 
don't need to run the program manual because "qconn" will launch it for you, but you need to make sure it's in your 
search path. Put the "pdebug" program under "/usr/bin" will do.

Re: RE: program debugging  
I put pdebug in BSP, and I can see it in /usr/sbin. But somehow I couldn't see the process with cmd 'pidin ar', the 
qconn process is there.

And the same thing, I couldn't debug the code, still got the following msg,

MsgNak received - resending
Timed out.

-Mei
Re: RE: program debugging  
Please put pdebug under "/usr/bin" not "/usr/sbin". It's a user level utility not a system level utility. It's not run 
by default so you won't see it in the process list. qconn will run it as needed.
Re: RE: program debugging  
Thanks for your help. It works after I put pdebug in /usr/bin.
One more question, why the printf msg is redirected to Momentics console instead of printing out in the target console 
screen?
Re: RE: program debugging  
When you run application from IDE its console input/output redirected to IDE console. Target console is probably 
specific "console" device or tty, to redirect output to it you need special code inside you application. If you run 
application directly on target it would be printed in the console you running it from.