aboutsummaryrefslogtreecommitdiff
blob: 409d737afb871b0c57de5fd38892d11514f3acd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
The purpose of this directory is to quicky set up your KDE4 (or any package) for debugging/profiling.

HOWTO:
- in /etc/portage/env create directory with the name of category the package belong to (kde-base, etc)
- in that category create file with package name (without version) - simple bash scrit to set up environment
  for you package (see example below)
- you can create "template" for those "profiles" and use symlinks as shown in example

This is example layout:

<dir>
/etc/portage/env:
+- debug-build
|
+- dev-db
|  |
|  +- mysql -> ../-fPIC
|  |
|  +- sqlite -> ../-O3
|
+- dev-lang
|  |
|  +- python -> ../-O3
|
+- -fPIC
|
+- -O3
|
+- profile-build
</dir>

Example debug-build file:

<code>
CFLAGS="-O0 -ggdb"
CXXFLAGS="${CFLAGS}"
# You can use either nostrip or splitdebug - refer to
# http://www.gentoo.org/proj/en/qa/backtraces.xml
# for more information
FEATURES="${FEATURES} splitdebug"
USE="${USE} debug"
</code>

NOTE:
- not all (usually only some of them) FEATURES work per package basis, so don't monkey too much!
- FEATURES are package manager specific and may behave (or not work at all) diffrrently per package
  basis with different package managers
- this hack is known to work with portage. Refer to your package manager documentation otherwise.
- you can use splitdebug instead of nostrip, there is installsources feature as well

Detailed information about how to obtain meaningful backtraces:
http://www.gentoo.org/proj/en/qa/backtraces.xml