/[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">
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>
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
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>

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

  ViewVC Help
Powered by ViewVC 1.1.20