Skip navigation.
Home
The QNX Community Portal

View topic - Problem with IDE 4.0 Debugger

Problem with IDE 4.0 Debugger

Read-only archive of qnx.newuser (Installation, configuration and administration of the QNX Neutrino or QNX Momentics environments) at inn.qnx.com

Problem with IDE 4.0 Debugger

Postby Dan Lukas » Fri Apr 13, 2007 2:54 pm

I am trying to use the debugger in Momentics IDE 4.0.
I have a Windows host and an x86 QNX target.
I have a simple "Hello World" project that compiles and runs fine.
I have followed the debugger example for setting up the project (Build
Variants) > debug (-g).
My target has the "pdebug" file in the /user/bin directory.

When I try to debug this (or any program) I get (in the Debug Window):
* Thread[1](Suspended:Signal'SIGSEGV' received.)
* 1 <symbol is not available> 0xb0332e41
* 2 <symbol is not available> 0xb0334b03
* 3 <symbol is not available> 0xb03348fb


The console window shows:
MsgNak received - resending

attach 2015271

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

attach 2023463

[Switching to process 2023463 (state = 0x03)]


I realize this is really simple stuff however, I am stuck. What am I doing
wrong?
Dan Lukas
 

RE: Problem with IDE 4.0 Debugger

Postby jcurry » Thu May 10, 2007 9:34 pm

I am having the same problem. Did you find a solution?
jcurry
New Member
 
Posts: 2
Joined: Tue Mar 30, 2004 5:56 pm

Re: Problem with IDE 4.0 Debugger

Postby jcurry » Thu May 10, 2007 9:45 pm

I have the same trouble. Did you find a solution?

Jim

Dan Lukas wrote:
I am trying to use the debugger in Momentics IDE 4.0.
I have a Windows host and an x86 QNX target.
I have a simple "Hello World" project that compiles and runs fine.
I have followed the debugger example for setting up the project (Build
Variants) > debug (-g).
My target has the "pdebug" file in the /user/bin directory.

When I try to debug this (or any program) I get (in the Debug Window):
* Thread[1](Suspended:Signal'SIGSEGV' received.)
* 1 <symbol is not available> 0xb0332e41
* 2 <symbol is not available> 0xb0334b03
* 3 <symbol is not available> 0xb03348fb


The console window shows:
MsgNak received - resending

attach 2015271

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

Warning: /cygdrive/c/QNX630/Examples/HelloWorld/C: No such file or
directory.

attach 2023463

[Switching to process 2023463 (state = 0x03)]


I realize this is really simple stuff however, I am stuck. What am I doing
wrong?

jcurry
New Member
 
Posts: 2
Joined: Tue Mar 30, 2004 5:56 pm

RE: Re: Problem with IDE 4.0 Debugger

Postby fkoch » Mon Aug 06, 2007 5:14 am

- remove all breakpoints
- remove all expressions
in the debugger. Let process stop in main.
fkoch
New Member
 
Posts: 1
Joined: Mon Aug 06, 2007 5:11 am

RE: Re: Problem with IDE 4.0 Debugger

Postby drfrogsplat » Tue Aug 21, 2007 5:37 am

I've got the same problem as the original poster (have you discovered a solution yet?)

The problem exists in both 3.x and 4.01 of the IDE, for all projects (including a brand new "hello world" C++ app with no breakpoints or expressions) with a windows host. If I run the IDE from a QNX host it works fine, so it seems to be a problem with Momentics in a Windows host...
drfrogsplat
New Member
 
Posts: 4
Joined: Mon May 15, 2006 7:21 am

RE: Re: Problem with IDE 4.0 Debugger

Postby drfrogsplat » Wed Aug 22, 2007 7:40 am

Further to my previous post...

If i run ntox86-gdb from the command line (windows host), I can perform the following to debug my code

    target ip:port
    symbol-file myprog
    run myprog <-- having uploaded it manually or via 'upload myprog destination'
    break main
    continue
* it now spits out some errors, but seems to continue just fine...
Error while mapping shared library sections:
libcpp.so.4: No such file or directory.
Error while mapping shared library sections:
libc.so.2: No such file or directory.
Error while reading shared library symbols:
libcpp.so.4: No such file or directory.
Error while reading shared library symbols:
libc.so.2: No such file or directory.

* it now breaks at the start of main
    continue
* it now continues successfully to the end

If i try the same thing from the console within the Momentics IDE on the Windows host, after starting a debug session, it causes the SIGSEGV behaviour - seemingly before actually entering main(), though i'm not 100% sure about this. No symbols can be resolved, and for some reason there are always 6 frames in the stack:

Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.)
6 <symbol is not available> 0xb0331bdc
5 <symbol is not available> 0xb0331c16
4 <symbol is not available> 0xb0331d9d
3 <symbol is not available> 0xb03348fb
2 <symbol is not available> 0xb0334b03
1 <symbol is not available> 0xb0332e41


This behaviour seems to occur with any program i try to debug from within the Momentics IDE (even telling it to run other files already on the QNX target causes the same problem), and I can't repeat it from the command line debugger, on either windows or QNX hosts.

Incidently, it looks like the warnings about "No such file or directory" from the original post are to do with the 'directory' search list set up for gdb when it is run. From the windows host, it is supplying one of the paths as C:\QNX630\... etc instead of /cygdrive/c/QNX630/... so it breaks up the path in the wrong spot. Adding the invalid paths to my command line instances of GDB didn't break them, nor did adding the corrected paths to my Momentics GDB fix it, so looks like that's unrelated...

I can see that Momentics is calling "attach" to a PID, whereas i'm debugging using "run" on a file on the remote system... this seems to be the only real difference betwen the two, but I"m not entirely sure what's going on there yet...
drfrogsplat
New Member
 
Posts: 4
Joined: Mon May 15, 2006 7:21 am

RE: Re: Problem with IDE 4.0 Debugger

Postby drfrogsplat » Wed Sep 12, 2007 4:34 am

After a tedious week or so of fighting with it, I eventually resorted to un-installing everything QNX related from my system and re-installing in the QNX recommended order (though I'm quite sure I did it in the right order the first time).

The good news is this fixed the problem, though i'm not 100% sure why... From having helped a couple of my colleagues fix their computers with the same symptoms, I have a vague idea though. The same symptoms arise if SP3 and/or the QNX 6.3.2A patch have not been installed on the Momentics host. So my best guess is that differing versions of the standard libraries cause the problem.

So if the target is completely up to date (i.e. with SP3 and 6.3.2A installed) then the host needs to have the same patches applied, in the same order (there's a slight difference at least between installing 6.3.2 then SP3 vs SP3 then 6.3.2 - though i think if SP3 and 6.3.2A are used the order isn't important).

Use qconfig from the command line to check which patches and service packs are installed (both on the Momentics host and the QNX target). And at the very worst, uninstall and reinstall QNX and associated service packs/patches :/

Finally, i had a problem twice after reinstalling it all with Momentics IDE 4.0. The problem was similar in each case, in that a single window/frame of the IDE would completely stop working (restarting momentics or the computer had no effect, nor did using different versions of the JVM) and simply say an exception was thrown in an error message in the frame itself. Uninstalling and reinstalling just the Momentics IDE 4.x package solved this both times. This particular problem was probably just something specific to my computer as I haven't seen it happen on any of my colleagues computers, but I figured I'd mention it in case someone else came across it.

Moral of the story: If in doubt, reinstall.

Hope that works for anyone else with this problem...
drfrogsplat
New Member
 
Posts: 4
Joined: Mon May 15, 2006 7:21 am


Return to qnx.newuser

Who is online

Users browsing this forum: No registered users and 2 guests