Gentoo Archives: gentoo-doc-cvs

From: Sven Vermeulen <swift@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: debugging-howto.xml
Date: Thu, 14 Jul 2005 09:42:44
Message-Id: 200507140942.j6E9gWTj002375@robin.gentoo.org
1 swift 05/07/14 09:42:27
2
3 Modified: xml/htdocs/doc/en/draft debugging-howto.xml
4 Log:
5 Coding Style
6
7 Revision Changes Path
8 1.3 +27 -26 xml/htdocs/doc/en/draft/debugging-howto.xml
9
10 file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/debugging-howto.xml?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=gentoo
11 plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/debugging-howto.xml?rev=1.3&content-type=text/plain&cvsroot=gentoo
12 diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/debugging-howto.xml.diff?r1=1.2&r2=1.3&cvsroot=gentoo
13
14 Index: debugging-howto.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/debugging-howto.xml,v
17 retrieving revision 1.2
18 retrieving revision 1.3
19 diff -u -r1.2 -r1.3
20 --- debugging-howto.xml 13 Jul 2005 18:58:31 -0000 1.2
21 +++ debugging-howto.xml 14 Jul 2005 09:42:27 -0000 1.3
22 @@ -1,6 +1,6 @@
23 <?xml version="1.0" encoding="UTF-8"?>
24 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
25 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/debugging-howto.xml,v 1.2 2005/07/13 18:58:31 fox2mike Exp $ -->
26 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/debugging-howto.xml,v 1.3 2005/07/14 09:42:27 swift Exp $ -->
27
28 <guide link="/doc/en/debugging-howto.xml">
29 <title>Gentoo Linux Debugging Guide</title>
30 @@ -138,8 +138,8 @@
31 </pre>
32
33 <p>
34 -Lastly, you can also add debug to the package's USE flags. This can be done with the
35 -<path>package.use</path> file.
36 +Lastly, you can also add debug to the package's USE flags. This can be done
37 +with the <path>package.use</path> file.
38 </p>
39
40 <pre caption="Using package.use to add debug USE flag">
41 @@ -245,8 +245,8 @@
42 run_it(), and somewhere in run_it() lies the strcpy() at fault. Things such as
43 this help developers narrow down problems. There are a few exceptions to the
44 output. First off is forgetting to enable debug symbols with
45 -<c>FEATURES="nostrip"</c>. With debug symbols stripped, the output looks something
46 -like this:
47 +<c>FEATURES="nostrip"</c>. With debug symbols stripped, the output looks
48 +something like this:
49 </p>
50
51 <pre caption="Program backtrace With debug symbols stripped">
52 @@ -311,13 +311,14 @@
53 </pre>
54
55 <p>
56 -As you can see, -ggdb3 adds about <e>13178</e> more bytes to the file size over the one
57 -with debugging symbols. However, as shown above, this increase in file size can
58 -be worth it if presenting debug information to developers. The backtrace can be
59 -saved to a file by copying and pasting from the terminal (if it's a non-x based
60 -terminal, you can use gpm. To keep this doc simple, I recommend you read up on
61 -the documentation for gpm to see how to copy and paste with it). Now that we're
62 -done with <c>gdb</c>, we can quit.
63 +As you can see, -ggdb3 adds about <e>13178</e> more bytes to the file size
64 +over the one with debugging symbols. However, as shown above, this increase
65 +in file size can be worth it if presenting debug information to developers.
66 +The backtrace can be saved to a file by copying and pasting from the
67 +terminal (if it's a non-x based terminal, you can use gpm. To keep this
68 +doc simple, I recommend you read up on the documentation for gpm to see
69 +how to copy and paste with it). Now that we're done with <c>gdb</c>, we
70 +can quit.
71 </p>
72
73 <pre caption="Quitting GDB">
74 @@ -327,11 +328,11 @@
75 </pre>
76
77 <p>
78 -This ends the walk-through of <c>gdb</c>. Using <c>gdb</c>, we hope that you will
79 -be able to use it to create better bug reports. However, there are other types
80 -of errors that can cause a program to fail during run time. One of the other
81 -ways is through improper file access. We can find those using a nifty little
82 -tool called <c>strace</c>.
83 +This ends the walk-through of <c>gdb</c>. Using <c>gdb</c>, we hope that you
84 +will be able to use it to create better bug reports. However, there are other
85 +types of errors that can cause a program to fail during run time. One of the
86 +other ways is through improper file access. We can find those using a nifty
87 +little tool called <c>strace</c>.
88 </p>
89
90 </body>
91 @@ -350,9 +351,9 @@
92 tool called <c>strace</c> was created to help deal with this. <c>strace</c>
93 traces system calls (hence the name) which include calls that use the memory and
94 files. For our example, we're going to take a program foobar2. This is an
95 -updated version of foobar. However, during the change over to foobar2, you notice
96 -all your configurations are missing! In foobar version 1, you had it setup to
97 -say "foo", but now it's using the default "bar".
98 +updated version of foobar. However, during the change over to foobar2, you
99 +notice all your configurations are missing! In foobar version 1, you had it
100 +setup to say "foo", but now it's using the default "bar".
101 </p>
102
103 <pre caption="Foobar2 With an invalid configuration">
104 @@ -406,9 +407,9 @@
105 <body>
106
107 <p>
108 -<c>strace</c> is a great way at seeing what the kernel is doing to with the filesystem.
109 -Another program exists to help users see what the kernel is doing, and help with
110 -kernel debugging. This program is called <c>dmesg</c>
111 +<c>strace</c> is a great way at seeing what the kernel is doing to with the
112 +filesystem. Another program exists to help users see what the kernel is doing,
113 +and help with kernel debugging. This program is called <c>dmesg</c>.
114 </p>
115
116 </body>
117 @@ -569,9 +570,9 @@
118 </pre>
119
120 <p>
121 -The program is compiling smoothly when it suddenly stops and presents an error message. This
122 -particular error can be split into 3 different sections, The compile messages, the build
123 -error, and the emerge error message as shown below.
124 +The program is compiling smoothly when it suddenly stops and presents an error
125 +message. This particular error can be split into 3 different sections, The
126 +compile messages, the build error, and the emerge error message as shown below.
127 </p>
128
129 <pre caption="Parts of the error">
130
131
132
133 --
134 gentoo-doc-cvs@g.o mailing list