Re: Segmentation fault, _malloc_prefork () - debugging help needed

2011-09-19 Thread Dan Nelson
In the last episode (Sep 18), Unga said:
 I'm developing an multi-threaded application on FreeBSD.
 
 When it is running for sometime, it develops a Segmentation fault.
 
 The ddd debugger shows following:
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 296c6580 (LWP 100137)]
 0x28ee390e in _malloc_prefork () from /lib/libc.so.7
 
 How could I know the exact line in source where this issue develops?

If you have a full /usr/src tree extracted, you can edit
/usr/src/lib/libc/Makefile and add

DEBUG_FLAGS=-g

at the top, then run make obj  make depend  make  make install to
install the new libc with debugging symbols.  Then your debugger will show
more info for functions inside libc.

If you don't have a source tree checked out yet, install the
devel/subversion-freebsd port, cd into /usr/src/ and run

svn co svn://svn.freebsd.org/base/stable/8 .

(or base/release/8.2.0, or base/stable/7 or base/head, depending on which
version you want; you can browse the branches at
http://svnweb.freebsd.org/base/ before you checkout anything)

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Segmentation fault, _malloc_prefork () - debugging help needed

2011-09-18 Thread Unga
Hi all

I'm developing an multi-threaded application on FreeBSD.

When it is running for sometime, it develops a Segmentation fault.

The ddd debugger shows following:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 296c6580 (LWP 100137)]
0x28ee390e in _malloc_prefork () from /lib/libc.so.7

How could I know the exact line in source where this issue develops?

Many thanks in advance.

Best regards
Unga

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org