| Author |
Message |
|
|
Post subject: Problem with IDE 4.0 Debugger
Posted: Apr 13, 2007 - 02: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? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Problem with IDE 4.0 Debugger
Posted: May 10, 2007 - 09:34 PM
|
|
New Member
Joined: Mar 30, 2004
Posts: 2
|
|
| I am having the same problem. Did you find a solution? |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: Problem with IDE 4.0 Debugger
Posted: May 10, 2007 - 09:45 PM
|
|
New Member
Joined: Mar 30, 2004
Posts: 2
|
|
I have the same trouble. Did you find a solution?
Jim
Dan Lukas wrote:
Quote:
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?
|
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: Problem with IDE 4.0 Debugger
Posted: Aug 06, 2007 - 05:14 AM
|
|
New Member
Joined: Aug 06, 2007
Posts: 1
|
|
- remove all breakpoints
- remove all expressions
in the debugger. Let process stop in main. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: Problem with IDE 4.0 Debugger
Posted: Aug 21, 2007 - 05:37 AM
|
|
New Member
Joined: May 15, 2006
Posts: 4
|
|
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... |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: Problem with IDE 4.0 Debugger
Posted: Aug 22, 2007 - 07:40 AM
|
|
New Member
Joined: May 15, 2006
Posts: 4
|
|
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...
Quote:
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
* 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:
Quote:
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... |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: Problem with IDE 4.0 Debugger
Posted: Sep 12, 2007 - 04:34 AM
|
|
New Member
Joined: May 15, 2006
Posts: 4
|
|
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... |
|
|
| |
|
|
|
 |
|
|