Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293102 - media-tv/xbmc-9999: extend debug functionality of USE="debug"
Summary: media-tv/xbmc-9999: extend debug functionality of USE="debug"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-13 18:44 UTC by hal
Modified: 2009-11-24 23:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hal 2009-11-13 18:44:34 UTC
i set the debug useflag to get proper backtraces for xbmc. these are very necessary for developers, if filing a bugreport for xbmc. see

-> http://xbmc.org/wiki/?title=HOW-TO_Submit_a_Proper_Bug_Report

according to
 
 -> http://www.gentoo.org/proj/en/qa/backtraces.xml

it is necessary to compile a package with certain c/cxxflags to get debugging symbols. xbmc itself is enabled to produce crashlogs via gdb. basically there are two things to extend in the ebuild, only setting the debug useflag for xbmc isn't enough obviously. crashlogs just show me no debugging symbols.

1. if debug useflag is set, pull in sys-devel/gdb
2. if debug useflag is set, replace c/cxxflags with suitable flags

atm i accomplished these two points with emerging gdb and setting custom c/cxxflags via the following methods:

-> http://archives.gentoo.org/gentoo-portage-dev/msg_fac717b026ba37b4396b448f1152153e.xml
-> http://gregarius.dropcode.net/demo/Planet_Gentoo/2009/08/01/Zhang_Le:_Setting_CFLAGS_on_a_per-package_basis

my setup for xbmc:
"cat /etc/portage/env/cflags_debug 
pre_pkg_setup() {
 local x
 for x in splitdebug ; do
  if ! has $x $FEATURES ; then
   elog "bashrc is adding $x to FEATURES for $PN"
   FEATURES="$FEATURES $x"
  fi
 done

# elog "bashrc is removing \"-O2\" from CFLAGS/CXXFLAGS for $PN"
# CFLAGS="${CFLAGS/-O2/}"
# CXXFLAGS="${CXXFLAGS/-O2/}"

 elog "bashrc is removing \"-fomit-frame-pointer\" from CFLAGS/CXXFLAGS for $PN"
 CFLAGS="${CFLAGS/-fomit-frame-pointer/}"
 CXXFLAGS="${CXXFLAGS/-fomit-frame-pointer/}"

 if ! has -ggdb $CFLAGS ; then
  elog "bashrc is adding \"-ggdb\" to CFLAGS/CXXFLAGS for $PN"
  CFLAGS="$CFLAGS -ggdb"
  CXXFLAGS="$CXXFLAGS -ggdb"
 fi
}"

all in all a lot to do for the average user. therefore it would be nice to accomplish these goals on a more automated way within the ebuild itself.
as far as i know this could be done with the helper functions provided by the flag-o-matic.eclass according to

-> http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1

Reproducible: Always

Steps to Reproduce:
1. set useflag debug
2. emerge xbmc-9999
3. initialize a crash
4. inspect ~/xbmc_crashlog_*

Actual Results:  
no debugging symbols found

Expected Results:  
proper debugging information
Comment 1 hal 2009-11-13 20:24:52 UTC
maybe setting c/cxxflags would be also possible with ./configure. according to its help:

"To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables."
Comment 2 hal 2009-11-23 15:56:35 UTC
also it would be useful to have sys-devel/gdb in case that USE="debug" is set
Comment 3 hal 2009-11-23 15:57:20 UTC
(In reply to comment #2)
> also it would be useful to have sys-devel/gdb in case that USE="debug" is set
> 

i mean as a dependency that should be pulled in while setting USE="debug"
Comment 4 SpanKY gentoo-dev 2009-11-23 16:31:20 UTC
that is not how USE=debug works
Comment 5 hal 2009-11-24 23:52:08 UTC
(In reply to comment #4)
> that is not how USE=debug works
> 

hm, ok. anything else we could do to get proper crashlogs on gentoo?