/[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.5 Revision 1.6
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.5 2005/07/22 23:46:11 neysx Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bugzilla-howto.xml,v 1.6 2005/08/30 02:51:12 vapier 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.4</version> 23<version>1.5</version>
24<date>2005-07-22</date> 24<date>2005-08-29</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
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 ggdb3
129to your CFLAGS and CXXFLAGS. This flag adds more debugging information than is 129to your CFLAGS and CXXFLAGS. This flag adds more debugging information than is
130generally included. We'll see what that means later on. This is how 130generally included. We'll see what that means later on. This is how
131<path>/etc/make.conf</path> <e>might</e> look with the newly added flags. 131<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="-O2 -pipe -ggdb3" 135CFLAGS="-O1 -pipe -g -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
269#16 0xb7deebcc in __new_exitfn () from /lib/libc.so.6 269#16 0xb7deebcc in __new_exitfn () from /lib/libc.so.6
270#17 0x00000000 in ?? () 270#17 0x00000000 in ?? ()
271#18 0xbfd19560 in ?? () 271#18 0xbfd19560 in ?? ()
272#19 0xb7ef017c in nullserv () from /lib/libc.so.6 272#19 0xb7ef017c in nullserv () from /lib/libc.so.6
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 -ggdb3 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 -ggdb3">
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 -ggdb3 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 -ggdb3 flag"> 303<pre caption="Filesize differences With -ggdb flag">
304<comment>(debug symbols stripped)</comment> 304<comment>(debug symbols stripped)</comment>
305-rwxr-xr-x 1 chris users 3140 6/28 13:11 bad_code 305-rwxr-xr-x 1 chris users 3140 6/28 13:11 bad_code
306<comment>(debug symbols enabled)</comment> 306<comment>(debug symbols enabled)</comment>
307-rwxr-xr-x 1 chris users 6374 6/28 13:10 bad_code 307-rwxr-xr-x 1 chris users 6374 6/28 13:10 bad_code
308<comment>(-ggdb3 flag enabled)</comment> 308<comment>(-ggdb flag enabled)</comment>
309-rwxr-xr-x 1 chris users 19552 6/28 13:11 bad_code 309-rwxr-xr-x 1 chris users 19552 6/28 13:11 bad_code
310</pre> 310</pre>
311 311
312<p> 312<p>
313As you can see, -ggdb3 adds about <e>13178</e> more bytes to the file size over the one 313As you can see, -ggdb adds about <e>13178</e> more bytes to the file size over the one
314with debugging symbols. However, as shown above, this increase in file size can 314with debugging symbols. However, as shown above, this increase in file size can
315be worth it if presenting debug information to developers. The backtrace can be 315be worth it if presenting debug information to developers. The backtrace can be
316saved to a file by copying and pasting from the terminal (if it's a non-x based 316saved to a file by copying and pasting from the terminal (if it's a non-x based
317terminal, you can use gpm. To keep this doc simple, I recommend you read up on 317terminal, you can use gpm. To keep this doc simple, I recommend you read up on
318the documentation for gpm to see how to copy and paste with it). Now that we're 318the documentation for gpm to see how to copy and paste with it). Now that we're
319done with <c>gdb</c>, we can quit. 319done with <c>gdb</c>, we can quit.
320</p> 320</p>
321 321
322<pre caption="Quitting GDB"> 322<pre caption="Quitting GDB">
323(gdb) <i>quit</i> 323(gdb) <i>quit</i>
324The program is running. Exit anyway? (y or n) <i>y</i> 324The program is running. Exit anyway? (y or n) <i>y</i>
325$ 325$
326</pre> 326</pre>
327 327
328<p> 328<p>

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20