pkgsrc-Users archive

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

Re: WindowMaker crashing - debugging



Riccardo Mottola <riccardo.mottola%libero.it@localhost> writes:

> 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.

So note the "you may have to fiddle".  Build the package, and read the
logs, and look at the various object files, and figure out where the
.stabs entries are not getting added or going astray.

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

Other than space, it shouldn't hurt to have more things built with
debugging.  And, it is helpful to have any used libraries with
symbols/debugging.

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

COPTS is for the base system.

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

It could.  We use -O2 -ggdb as a compromise between debugging and
production - we always build this way.

> 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 :)

You'll  have to dig into wm's build process....

Attachment: pgpQrrhidqFSQ.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index