/[gentoo]/xml/htdocs/doc/en/bugzilla-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/bugzilla-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 Revision 1.15
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bugzilla-howto.xml,v 1.14 2009/01/26 07:34:41 nightmorph Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bugzilla-howto.xml,v 1.15 2009/03/05 12:02:04 jkt Exp $ -->
4 4
5<guide link="/doc/en/bugzilla-howto.xml"> 5<guide link="/doc/en/bugzilla-howto.xml">
6<title>Gentoo Bug Reporting Guide</title> 6<title>Gentoo Bug Reporting Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="chriswhite@gentoo.org">Chris White</mail> 9 <mail link="chriswhite@gentoo.org">Chris White</mail>
10</author> 10</author>
11<author title="Editor"> 11<author title="Editor">
12 <mail link="fox2mike@gentoo.org">Shyam Mani</mail> 12 <mail link="fox2mike@gentoo.org">Shyam Mani</mail>
13</author> 13</author>
14 14
15<abstract> 15<abstract>
16This document shows the proper method of reporting bugs using Bugzilla. 16This document shows the proper method of reporting bugs using Bugzilla.
17</abstract> 17</abstract>
18 18
19<!-- The content of this document is licensed under the CC-BY-SA license --> 19<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 20<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 21<license/>
22 22
23<version>1.12</version> 23<version>1.13</version>
24<date>2009-01-25</date> 24<date>2009-03-05</date>
25 25
26<chapter> 26<chapter>
27<title>Introduction</title> 27<title>Introduction</title>
28<section> 28<section>
29<title>Preface</title> 29<title>Preface</title>
30<body> 30<body>
31 31
32<p> 32<p>
33One of the factors that delay a bug being fixed is the way it is reported. By 33One of the factors that delay a bug being fixed is the way it is reported. By
34creating this guide, we hope to help improve the communication between 34creating this guide, we hope to help improve the communication between
35developers and users in bug resolution. Getting bugs fixed is an important, if 35developers and users in bug resolution. Getting bugs fixed is an important, if
36not crucial part of the quality assurance for any project and hopefully this 36not crucial part of the quality assurance for any project and hopefully this
37guide will help make that a success. 37guide will help make that a success.
38</p> 38</p>
39 39
113The reason is the same as that for having gzipped man pages -- saving space. 113The reason is the same as that for having gzipped man pages -- saving space.
114Here's how the size of a program varies with and without debug symbol stripping. 114Here's how the size of a program varies with and without debug symbol stripping.
115</p> 115</p>
116 116
117<pre caption="Filesize Comparison"> 117<pre caption="Filesize Comparison">
118<comment>(debug symbols stripped)</comment> 118<comment>(debug symbols stripped)</comment>
119-rwxr-xr-x 1 chris users 3140 6/28 13:11 bad_code 119-rwxr-xr-x 1 chris users 3140 6/28 13:11 bad_code
120<comment>(debug symbols intact)</comment> 120<comment>(debug symbols intact)</comment>
121-rwxr-xr-x 1 chris users 6374 6/28 13:10 bad_code 121-rwxr-xr-x 1 chris users 6374 6/28 13:10 bad_code
122</pre> 122</pre>
123 123
124<p> 124<p>
125Just for reference, <e>bad_code</e> is the program we'll be debugging with 125Just for reference, <e>bad_code</e> is the program we'll be debugging with
126<c>gdb</c> later on. As you can see, the program without debugging symbols is 126<c>gdb</c> later on. As you can see, the program without debugging symbols is
1273140 bytes, while the program with them is 6374 bytes. That's close to double 1273140 bytes, while the program with them is 6374 bytes. That's close to double
128the size! Two more things can be done for debugging. The first is adding ggdb3 128the size! Two more things can be done for debugging. The first is adding
129to your CFLAGS and CXXFLAGS. This flag adds more debugging information than is 129<c>ggdb</c> to your CFLAGS and CXXFLAGS. This flag adds more debugging
130generally included. We'll see what that means later on. This is how 130information than is generally included. We'll see what that means later on. This
131<path>/etc/make.conf</path> <e>might</e> look with the newly added flags. 131is how <path>/etc/make.conf</path> <e>might</e> look with the newly added flags.
132</p> 132</p>
133 133
134<pre caption="make.conf settings"> 134<pre caption="make.conf settings">
135CFLAGS="-O1 -pipe -g -ggdb" 135CFLAGS="-O1 -pipe -ggdb"
136CXXFLAGS="${CFLAGS}" 136CXXFLAGS="${CFLAGS}"
137</pre> 137</pre>
138 138
139<p> 139<p>
140Lastly, you can also add debug to the package's USE flags. This can be done 140Lastly, you can also add debug to the package's USE flags. This can be done
141with the <path>package.use</path> file. 141with the <path>package.use</path> file.
142</p> 142</p>
143 143
144<pre caption="Using package.use to add debug USE flag"> 144<pre caption="Using package.use to add debug USE flag">
145# <i>echo "category/package debug" >> /etc/portage/package.use</i> 145# <i>echo "category/package debug" >> /etc/portage/package.use</i>
146</pre> 146</pre>
147 147
148<note> 148<note>
149The directory <path>/etc/portage</path> does not exist by default and you may 149The directory <path>/etc/portage</path> does not exist by default and you may
150have to create it, if you have not already done so. If the package already has 150have to create it, if you have not already done so. If the package already has
273#20 0xb7dd6f37 in __libc_start_main () from /lib/libc.so.6 273#20 0xb7dd6f37 in __libc_start_main () from /lib/libc.so.6
274#21 0x00000001 in ?? () 274#21 0x00000001 in ?? ()
275#22 0xbfd195d4 in ?? () 275#22 0xbfd195d4 in ?? ()
276#23 0xbfd195dc in ?? () 276#23 0xbfd195dc in ?? ()
277#24 0x08048201 in ?? () 277#24 0x08048201 in ?? ()
278</pre> 278</pre>
279 279
280<p> 280<p>
281This backtrace contains a large number of ?? marks. This is because without 281This backtrace contains a large number of ?? marks. This is because without
282debug symbols, <c>gdb</c> doesn't know how the program was run. Hence, it is 282debug symbols, <c>gdb</c> doesn't know how the program was run. Hence, it is
283crucial that debug symbols are <e>not</e> stripped. Now remember a while ago we 283crucial that debug symbols are <e>not</e> stripped. Now remember a while ago we
284mentioned the -ggdb flag. Let's see what the output looks like with the flag 284mentioned the -ggdb flag. Let's see what the output looks like with the flag
285enabled: 285enabled:
286</p> 286</p>
287 287
288<pre caption="Program backtrace with -ggdb3"> 288<pre caption="Program backtrace with -ggdb">
289(gdb) <i>bt</i> 289(gdb) <i>bt</i>
290#0 0xb7e4bdc0 in strcpy () from /lib/libc.so.6 290#0 0xb7e4bdc0 in strcpy () from /lib/libc.so.6
291#1 0x0804838c in run_it (input=0x0) at bad_code.c:7 291#1 0x0804838c in run_it (input=0x0) at bad_code.c:7
292#2 0x080483ba in main (argc=1, argv=0xbfd3a434) at bad_code.c:12 292#2 0x080483ba in main (argc=1, argv=0xbfd3a434) at bad_code.c:12
293</pre> 293</pre>
294 294
295<p> 295<p>
296Here we see that a lot more information is available for developers. Not only is 296Here we see that a lot more information is available for developers. Not only is
297function information displayed, but even the exact line numbers of the source 297function information displayed, but even the exact line numbers of the source
298files. This method is the most preferred if you can spare the extra space. 298files. This method is the most preferred if you can spare the extra space.
299Here's how much the file size varies between debug, strip, and -ggdb enabled 299Here's how much the file size varies between debug, strip, and -ggdb enabled
300programs. 300programs.
301</p> 301</p>
302 302
303<pre caption="Filesize differences With -ggdb flag"> 303<pre caption="Filesize differences With -ggdb flag">

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20