Gentoo Archives: gentoo-dev

From: Ned Ludd <solar@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Split ELF Debug (default or not?)
Date: Sun, 27 Nov 2005 13:43:35
Message-Id: 1133098829.5422.409.camel@localhost
In Reply to: Re: [gentoo-dev] Re: Split ELF Debug (default or not?) by Ivan Yosifov
1 On Sun, 2005-11-27 at 15:09 +0200, Ivan Yosifov wrote:
2 > On Sun, 2005-11-27 at 07:24 -0500, Ned Ludd wrote:
3 > > On Sat, 2005-11-26 at 13:20 -0600, R Hill wrote:
4 > > > Ned Ludd wrote:
5 > > > > Good afternoon,
6 > > > >
7 > > > > probably in portage-2.0.54 a patch will be added to emit split debug
8 > > > > info. Having a split debug allows us to retain all the advantages of
9 > > > > stripping executables while gaining the ability to properly debug
10 > > > > executables in bfd aware programs. It's been in testing with a small
11 > > > > hand full of devs and works quite well, but before it's pushed in we
12 > > > > would like to get input from our devs & users.
13 > > > >
14 > > > > Would you be willing to give up space in $ROOT/usr/lib/debug for ELF
15 > > > > executables by default in order to aid in better debugging by or do we
16 > > > > want to only emit it when a FEATURE= is defined.
17 > > >
18 > > > How much space are we talking about?
19 > >
20 > > There is no fixed size here and depends on the number of packages you
21 > > have and the CFLAGS passed to the programs you build.
22 > > Naturally if you start building all your code with
23 > > CFLAGS="-g3 -ggdb" your going to end up with a larger debug info.
24 >
25 > Of course I will be compiling with CFLAGS="-g3 -ggdb" :)
26 >
27 > The reason I don't do it now is because debug info:
28 >
29 > 1) makes binaries larger
30 > 2) makes binaries slower ( in my experience ( may have to do with 1) )
31 >
32 > And I don't ( not sure if anyone does ) care about any non-gdb debugger.
33 >
34 > So, can you give us a wild guess about the disk space ? How much does it
35 > take on your system and how many packages do you have installed ?
36
37 -rwxr-xr-x 1 root root 49268 Nov 19 18:00 /usr/bin/scanelf
38 -rw-r--r-- 1 root root 5292 Nov 19
39 18:02 /usr/lib/debug/usr/bin/scanelf.debug
40
41
42 I really can't give an accurate example. Halcyon who has been testing it
43 merged world and he was yeilded with 18M of debug info (I have no idea
44 how many packages he has). ChrisWhite has also been merging a lot of
45 merging with it recently to test KDE stuff which is a pretty big
46 package. He may have some useful data that your after. The reason I
47 posted the patch and prepstrip here was so that people could formulate
48 their own opinions.
49
50 I'm also using an additional patch in my local portage system where I'm
51 sub packaging the debug info and it only gets installed when I tell it
52 to be installed via the emerge -K option. I use some pretty crafty
53 tricks to accomplish this like dynamic ebuild creation. I do this in
54 order to have compressed debug info handy vs having it on the live
55 filesystem. This probably would not be accepted by portage mainline
56 unless I do it in a more elegant way that wont conflict with the future
57 portage-3.x series.
58
59 > And one more thing. For proper debugging, don't I need the source to be
60 > present ?
61
62 -g3 -ggdb embeds the source code in the debug info so I don't see the
63 point.
64
65 --
66 Ned Ludd <solar@g.o>
67 Gentoo Linux
68
69 --
70 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: Split ELF Debug (default or not?) Edward Catmur <ed@×××××××××.uk>
Re: [gentoo-dev] Re: Split ELF Debug (default or not?) Mark Loeser <halcy0n@g.o>