Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Momentics IDE error while doing Debug: Page 1 of 2 (38 Items)
   
Momentics IDE error while doing Debug  
I am trying to Debug a C project, and do a QConn onto a target system.
My IDE environment is Momentics 6.3 with SP3, and IDE 4.0. The target is runtime neutrino 6.3.
I get the error shown in the attachment, and the thread suspends with a SIGSEV.
I have included a view of the Disassembly window, if it helps.
The Run configuration executes properly on the target.
Attachment: Image QNXDebuggerError.JPG 137.22 KB
Re: Momentics IDE error while doing Debug  
Did you program try to step into the kernel memory space, e.g. pointer
error to any library function? Your program got SIGSEGV because it tried
to make an invalid memory reference.

Also make sure you compile your program with debug option (-g) so you
have symbol information in the debug view. Try to put a break point in
"main()" to start debugging.

-----Original Message-----
From: Rashid Mirza <community-noreply@qnx.com>
Reply-to: post59634@community.qnx.com
To: general-ide <post59634@community.qnx.com>
Subject: Momentics IDE error while doing Debug
Date: Fri, 16 Jul 2010 07:57:32 -0400 (EDT)

I am trying to Debug a C project, and do a QConn onto a target system.
My IDE environment is Momentics 6.3 with SP3, and IDE 4.0. The target is runtime neutrino 6.3.
I get the error shown in the attachment, and the thread suspends with a SIGSEV.
I have included a view of the Disassembly window, if it helps.
The Run configuration executes properly on the target.




_______________________________________________

General
http://community.qnx.com/sf/go/post59634
Re: Momentics IDE error while doing Debug  
where can i insert the -g option, which part of the build window or properties?
Re: Momentics IDE error while doing Debug  
If it's a QNX C project, you can open the project properties -> Build
Variants, select the "debug" variant.

If it's a standard make project, you can add "-g" option to the CCFLAGS
in your make file.

You can reference the IDE user's guide for the 6.3.2 release for more
information on build and debug options:

http://www.qnx.com/download/download/16839/ide_user_guide.pdf


-----Original Message-----
From: Rashid Mirza <community-noreply@qnx.com>
Reply-to: post59652@community.qnx.com
To: general-ide <post59652@community.qnx.com>
Subject: Re: Momentics IDE error while doing Debug
Date: Fri, 16 Jul 2010 10:48:50 -0400 (EDT)

where can i insert the -g option, which part of the build window or properties?




_______________________________________________

General
http://community.qnx.com/sf/go/post59652

Re: Momentics IDE error while doing Debug  
already the debug build variant has been selected.
do i still need to do a -g option?
Is there anything else i could try, in order to get this working?
Re: Momentics IDE error while doing Debug  
Did you put a break point at the beginning of your "main()"? Did the
program stop at that break point?

-----Original Message-----
From: Rashid Mirza <community-noreply@qnx.com>
Reply-to: post59661@community.qnx.com
To: general-ide <post59661@community.qnx.com>
Subject: Re: Momentics IDE error while doing Debug
Date: Fri, 16 Jul 2010 11:49:25 -0400 (EDT)

already the debug build variant has been selected.
do i still need to do a -g option?
Is there anything else i could try, in order to get this working?



_______________________________________________

General
http://community.qnx.com/sf/go/post59661

Re: Momentics IDE error while doing Debug  
yes it did, and it seems these errors take place, even before control reaches main().
Re: Momentics IDE error while doing Debug  
This is strange. Can you attach your project to this post?

-----Original Message-----
From: Rashid Mirza <community-noreply@qnx.com>
Reply-to: post59666@community.qnx.com
To: general-ide <post59666@community.qnx.com>
Subject: Re: Momentics IDE error while doing Debug
Date: Fri, 16 Jul 2010 12:12:17 -0400 (EDT)

yes it did, and it seems these errors take place, even before control reaches main().



_______________________________________________

General
http://community.qnx.com/sf/go/post59666

Re: Momentics IDE error while doing Debug  
I am doing a Qconn onto a QNX environment in a virtual machine. Could this be a cause for this error?
I need to try it on a dedicated QNX box and see if it makes a difference.
Re: Momentics IDE error while doing Debug  
just want to make sure, should i be using the QN GDB Debugger?
any additions to Main or Shared Libraries under Debugger tab?

Re: Momentics IDE error while doing Debug  
Yes if you debugging with shared library you need to add shared library 
paths to Debugger tab. Also they have to be compiled with -g.
See also debugger FAQ: 
http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/DebuggerFAQ


Rashid Mirza wrote:
> just want to make sure, should i be using the QN GDB Debugger?
> any additions to Main or Shared Libraries under Debugger tab?
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post59767
>
>   
Re: Momentics IDE error while doing Debug  
this is my doubt, where do i insert the -g, as part of which statement and where?
Re: Momentics IDE error while doing Debug  
tried with a dedicated QNX box, and still have the same error...
Re: Momentics IDE error while doing Debug  
wel,l i checked on a dedicated QNX box, and still get the same error...
Re: Momentics IDE error while doing Debug  
the project uses static libraries, do i have to move then (.a) to qnx6/x86/lib and usr/qnx632/target?
Re: Momentics IDE error while doing Debug  
Pp

----- Original Message -----
From: Rashid Mirza <community-noreply@qnx.com>
To: general-ide <post59863@community.qnx.com>
Sent: Mon Jul 19 15:42:07 2010
Subject: Re: Momentics IDE error while doing Debug

the project uses static libraries, do i have to move then (.a) to qnx6/x86/lib and usr/qnx632/target?



_______________________________________________

General
http://community.qnx.com/sf/go/post59863

Re: Momentics IDE error while doing Debug  
ok, made some progress, and found out where the execution is coming to a halt.
I have attached a screen shot.
Also i replaced ntox86-gdb.exe ver 6.7 (did a backup of the old notx86-gdb file, cuase could not determine which version
 it was), to get more info, and found in the console window a mismatch of the host and target libc.so file.
How can i solve this issue? Where do i have to do the change? Where can i donwload the neccessary file, and how do i 
install it?

console window:

MsgNak received - resending
Remote target is little-endian
attach 1376294
Setting Dynamic-Linker Breakpoint based on C:/QNX630/target/qnx6/x86/usr/lib/ldqnx.so.2
warning: Host file C:/QNX630/target/qnx6/x86/usr/lib/ldqnx.so.2 does not match target file /usr/lib/ldqnx.so.2
0xb0334792 in ?? ()
mi_cmd_var_create: unable to create variable object
mi_cmd_var_create: unable to create variable object


i did a qconfig on my target and got the following information:


Installtion Name: QNX Neutrino RTOS x86 Runtime Kit 6.3.2
Version: 6.3.2
Base Directory: /
QNX_HOST: /
QNX_TARGET: /

should there be a path for QNX_HOST and QNX_TARGET?
if so, how do i set the path?
Appreciate the help..want to finish this ASAP...
RE: Momentics IDE error while doing Debug  
I don't see the screen shot, did you forget to attach it?

You have mismatching libc because you are running 6.3.0 SP3 on host but 6.3.2 on target. You can contact your QNX sales 
rep for an upgrade to 6.3.2. But I suspect this is the root cause of your problem.

Have you tried the latest gdb? you can download it from this link http://community.qnx.com/sf/frs/do/listReleases/
projects.toolchain/frs.gdb

Another possibility is error in your code. Going back to your first post that your program got SIGSEGV and now you got "
mi_cmd_var_create: unable to create variable object", you can check in the "Breakpoint" view to see where you put your 
breakpoint. Remove all other breakpoints except the one at your "main()".


-----Original Message-----
From: Rashid Mirza [mailto:community-noreply@qnx.com]
Sent: Tue 20/07/2010 7:41 AM
To: general-ide
Subject: Re: Momentics IDE error while doing Debug
 
ok, made some progress, and found out where the execution is coming to a halt.
I have attached a screen shot.
Also i replaced ntox86-gdb.exe ver 6.7 (did a backup of the old notx86-gdb file, cuase could not determine which version
 it was), to get more info, and found in the console window a mismatch of the host and target libc.so file.
How can i solve this issue? Where do i have to do the change? Where can i donwload the neccessary file, and how do i 
install it?

console window:

MsgNak received - resending
Remote target is little-endian
attach 1376294
Setting Dynamic-Linker Breakpoint based on C:/QNX630/target/qnx6/x86/usr/lib/ldqnx.so.2
warning: Host file C:/QNX630/target/qnx6/x86/usr/lib/ldqnx.so.2 does not match target file /usr/lib/ldqnx.so.2
0xb0334792 in ?? ()
mi_cmd_var_create: unable to create variable object
mi_cmd_var_create: unable to create variable object


i did a qconfig on my target and got the following information:


Installtion Name: QNX Neutrino RTOS x86 Runtime Kit 6.3.2
Version: 6.3.2
Base Directory: /
QNX_HOST: /
QNX_TARGET: /

should there be a path for QNX_HOST and QNX_TARGET?
if so, how do i set the path?
Appreciate the help..want to finish this ASAP...



_______________________________________________

General
http://community.qnx.com/sf/go/post59917


Attachment: Text winmail.dat 3.65 KB
Re: RE: Momentics IDE error while doing Debug  
fine i will look into preparing my host with qnx 6.3.2 sp3. 
Is there a way to obtain what my existing installation is on the host, i.e the version on QNX?
i have attached screen dump now.
Attachment: Image Debug_moreinfo.JPG 139.67 KB
RE: RE: Momentics IDE error while doing Debug  
You need 6.3.2, not "6.3.2 sp3". There is no "sp3" for 6.3.2.

I don't understand your question of "existing installation is on the host". You are going to install 6.3.2 to your host 
and run IDE from 6.3.2. By default it installs to "C:\QNX632" directory so it will not remove your existing installation
 of 6.3.0 SP3.


-----Original Message-----
From: Rashid Mirza [mailto:community-noreply@qnx.com]
Sent: Tue 20/07/2010 8:36 AM
To: general-ide
Subject: Re: RE: Momentics IDE error while doing Debug
 
fine i will look into preparing my host with qnx 6.3.2 sp3. 
Is there a way to obtain what my existing installation is on the host, i.e the version on QNX?
i have attached screen dump now.
Attachment: Text winmail.dat 2.73 KB
Re: RE: RE: Momentics IDE error while doing Debug  
ok, a installation to another directory is good, let me try and i will get back
Re: RE: Momentics IDE error while doing Debug  
Looking at your screen shot, it seems like your program is not compiled with debug info. Did you compile it with "-g" 
option?
Re: RE: Momentics IDE error while doing Debug  
since i am using the IDE for compilation, i dont know where i have to insert the -g option. which part of the IDE?
Re: RE: Momentics IDE error while doing Debug  
i would like to add, i had similar error (as my first attachment) when i checked Debug with a dedicated QNX box, but 
that was running 6.3.0 SP3, therefore it was matching my host which was also 6.3.0 with SP3.
Re: Momentics IDE error while doing Debug  
If you using debug variant it is inserted automatically. You can check 
that but looking at the build output on console - you will see full 
command line, make
sure it includes -g. Answer on your question about where to insert -g 
depends on what type of project you are using. Is it qnx project?

Rashid Mirza wrote:
> since i am using the IDE for compilation, i dont know where i have to insert the -g option. which part of the IDE?
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post59941
>
>