Skip navigation.
Home
The QNX Community Portal

View topic - How best to debug a SIGSEGV segmentation fault in QNX app

How best to debug a SIGSEGV segmentation fault in QNX app

For discussion of realtime and/or embedded programming.

How best to debug a SIGSEGV segmentation fault in QNX app

Postby MarkR » Wed Oct 26, 2005 10:35 pm

Hello,
I have a multithreaded QNX 6.2.1 application running on an embedded x86 target which is terminating randomly with a memory fault. Running the application in the QNX IDE debugger has shown the problem is generating a SIGSEGV signal and the debugger call stack shows all the threads suspended, but how can I find the thread and source code line which generated the fault? Trying to use the debugger in a post-mortem mode with a core dump file generated from the dumper utility has been unsuccessful. When the core dump file is loaded in the debugger, it shows nothing in the debug or information panes. Any ideas or hints on how to use the debugger to find this problem would be greatly appreciated.

Thanks!
MarkR
New Member
 
Posts: 2
Joined: Wed Oct 26, 2005 10:04 pm

RE: How best to debug a SIGSEGV segmentation fault in QNX ap

Postby qnxloader » Thu Oct 27, 2005 5:50 am

Your bild variant is "debug"? What show command: gdb prog prog.core ?
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am

RE: How best to debug a SIGSEGV segmentation fault in QNX ap

Postby MarkR » Mon Oct 31, 2005 4:58 pm

Thanks for the suggestion. Yes I am using a debug variant build. By trying to evoke gdb debugger from the command line as suggested I found the issue is in the Momentic IDE. It does not appear to handle windows directory names with spaces for the path to the core dump file. After a directory rename I can now load the core dump file into the IDE debugger and see the thread states at the seg fault. Unfortunately it still is not very clear were the seg fault happened and what the cause was.

-MarkR
MarkR
New Member
 
Posts: 2
Joined: Wed Oct 26, 2005 10:04 pm

Postby green67 » Tue Sep 15, 2009 5:54 am

This print filter can have a segmentation fault when running with the -Q2 quality. When you create a QNX project in the IDE, a static+shared+debug will occur. If you get any solution please do share with all of us.

___________________________
646-204 questions | 642-901 questions | 642-892 questions
green67
New Member
 
Posts: 4
Joined: Tue Sep 15, 2009 5:11 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 1 guest