Gentoo Archives: gentoo-dev

From: Stefan Jones <cretin@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] DEBUG version of Gentoo Linux
Date: Tue, 11 Feb 2003 13:14:46
Message-Id: 32473.213.121.89.82.1044968759.squirrel@unicorn.no-ip.org
In Reply to: [gentoo-dev] DEBUG version of Gentoo Linux by Nugzar Nebieridze
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

Replies

Subject Author
Re[2]: [gentoo-dev] DEBUG version of Gentoo Linux Nugzar Nebieridze <nugzar@××××××××××.com>