pkgsrc-Users archive

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

Re: WindowMaker crashing - debugging



Hi,

Greg Troxel wrote:
Basically set CFLAGS and CXXFLAGS in mk.conf.  However, you may have to
fiddle with each packages build infrastructure as it may not honor the
passed-in flags.

CFLAGS += -O2
CXXFLAGS += -O2
Fine - that means I need to set it system-wide and recompile only that single package while debugging.

I did not have CFLAGS set ther, but I had COPTS.

CFLAGS += -ggdb
CXXFLAGS += -ggdb
INSTALL_UNSTRIPPED = yes
I copy&pasted exactly these three lines, I left -O2 out. Perhaps -O0 could be used

I think this will make debugging mostly work ok; we have built a lot of
packages with these settings and found it helpful.
I have quite an improvement, but I still lack symbols, the stacktrace I do get now is:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/pkg/bin/wmaker...(no debugging symbols found)...done.
[New process 1]
Core was generated by `wmaker'.
Program terminated with signal 11, Segmentation fault.
#0  0x08097e44 in wManageWindow ()
(gdb) bt
#0  0x08097e44 in wManageWindow ()
#1  0x0806eac0 in DispatchEvent ()
#2  0xbbbad544 in WMHandleEvent () from /usr/pkg/lib/libWINGs.so.2
#3  0x0806ffa5 in EventLoop ()
#4  0x080a4bac in main ()

We at least have the function names, but without debugging symbols, no variables and no line numbers. Just little less useless :)

Riccardo




Home | Main Index | Thread Index | Old Index