pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pgadmin3 crashes -- help debugging



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



Home | Main Index | Thread Index | Old Index