Subject: Re: pgadmin3 crashes -- help debugging
To: None <pkgsrc-users@netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: pkgsrc-users
Date: 10/15/2006 17:47:13
Jan Danielsson wrote:
>    When I use OS/2, I simply compile with the appropriate debugging
> options, and made sure that the linker didn't strip debugging
> information. Then I run the program through the debugger, and .. well..
> I find, and fix the, problem(s). Even if I forget to compile the program
> with the appropriate debugging options, I could always see the machine
> code in the debugger.

That's not different in any way on NetBSD.

>    I don't even know where to begin when it comes to debugging programs
> in NetBSD. Well, actually, I do. I guess I should use "gdb"

Yes.

> But how do I get source code view in "gdb"?
> How do I make sure that the appropriate debugging data is compiled in
> when I build packages from pkgsrc?

Add this to your mk.conf:

CFLAGS+=-O0 -g3
CXXFLAGS+=-O0 -g3
INSTALL_UNSTRIPPED=YES

The latter doesn't seem to be documented in pkgsrc.txt but I just
tried it with chat/irssi and it worked.
 
-- 
Christian