1 |
Nugzar Nebieridze said: |
2 |
> I am interested in creating a DEBUG version of Gentoo Linux, so that |
3 |
> all the software should include debug symbols (for GDB for example). |
4 |
> |
5 |
> Which compiler flags should I use for that? Can I add some |
6 |
> optimizations also or it is impossible to have debug info with |
7 |
> optimized versions? Have you any suggestions? |
8 |
> |
9 |
> Any help is appreciated. |
10 |
|
11 |
|
12 |
Well to have full debuging support (ie. filenames and line numbers in gdb) |
13 |
you need to add -g to your CFLAGS and export the env variable DEBUGBUILD |
14 |
(which will stop the debuging symbols being striped). |
15 |
If just having the function names in a gdb backtrace is enough just make |
16 |
sure -fomit-frame-pointer is NOT in your CFLAGS. |
17 |
Full debug support will take up ALOT more space and isn't really needed as |
18 |
you rarely have to debug system libraries. I just compile the application |
19 |
which I am working on with -g, just getting the function names in gdb for |
20 |
libraries is fine for me. |
21 |
Stefan |
22 |
|
23 |
|
24 |
|
25 |
-- |
26 |
gentoo-dev@g.o mailing list |