As i believe, the DEBUG use flag is completly useless if emerge still strips debugging info from the files after they are compiled. Its useless for real debug. Portage 2.1_pre9-r4 (default-linux/x86/2005.0, gcc-3.4.6, glibc-2.4-r1, 2.6.16-gentoo-r1 i686) ================================================================= System uname: 2.6.16-gentoo-r1 i686 Pentium III (Coppermine) Gentoo Base System version 1.12.0_pre18 ccache version 2.4 [enabled] dev-lang/python: 2.3.5, 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict userpriv" GENTOO_MIRRORS="http://darkstar.ist.utl.pt/gentoo/ ftp://ftp.rnl.ist.utl.pt/gentoo/ ftp://ibiblio.org/pub/Linux/distributions/gentoo/" LANG="pt_PT@euro" LC_ALL="pt_PT@euro" LINGUAS="en_GB pt" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://darkstar.ist.utl.pt/gentoo-portage" USE="x86 X alsa apm avi bitmap-fonts cairo cli crypt dri dts dvd dvdr dvdread emboss encode ffmpeg flac font-server foomaticdb fortran gd gif gpm gstreamer gtk gtk2 httpd imap imlib ipv6 isdnlog jpeg kde libwww mad matroska mikmod mmx mmxext mp3 mpeg msn musicbrainz ncurses nls noreiserfs nptl nptlonly nvidia offensive ogg oggvorbis opengl oss pam pcre pdflib perl php png postgres pppd python qt readline real reflection rtc sdl session silc sox speex spell spl sse ssl stream subversion svg tcpd theora tiff transcode truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs wmf wxwindows x xml2 xmms xorg xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB linguas_pt userland_GNU video_cards_vesa video_cards_nv video_cards_nvidia" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS
debug useflag in KDE applications adds _lot_ more debug output, and cares nothing about symbols. If you want to get symbols for backtracing purposes, you add "-ggdb" in your C[XX]FLAGS and "splitdebug" to your FEATURES. Also drop -fomit-frame-pointer or the code will be almost unusable.
FEATURES=nostrip is the key, beside what Diego mentioned. Pedro, you have a point, but it's a longstanding issue with Gentoo and not KDE specfic.
(In reply to comment #1) > debug useflag in KDE applications adds _lot_ more debug output, and cares > nothing about symbols. > > If you want to get symbols for backtracing purposes, you add "-ggdb" in your > C[XX]FLAGS and "splitdebug" to your FEATURES. > Also drop -fomit-frame-pointer or the code will be almost unusable. > Cares nothing about symbols? Have you seen the window that any KDE apps opens when it crashes? It opens a window with the backtrace to where it crashes, and its completly useless without any debugging info, so to my looks the DEBUG use flag is complety useless for DEBUGGING.
Please re-read what I said. Twice. The debug useflag is not thought to enable useful backtraces, but rather to add debugging tracing _from the code itself_ (kdDebug(), if you ever programmed with KDE, I do quite a bit). For what you want (useful backtraces) you need to follow what I said.
Shoulnt it be called KDEBUG then?
Because it's the same thing for every other software, too. You might be interested in http://www.gentoo.org/proj/en/qa/backtraces.xml to get useful backtraces.