Debian Codegraph @

autotests/html/highlight.gdb.dark.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <title>highlight.gdb</title>
5 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (GDB) - Theme (Breeze Dark)"/>
6 </head><body style="background-color:#232629;color:#cfcfc2"><pre>
7 GNU gdb (GDB) 8.1
8 Copyright (C) 2018 Free Software Foundation, Inc.
9 License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
10 This is free software: you are free to change and redistribute it.
11 There is NO WARRANTY, to the extent permitted by law. Type &quot;show copying&quot;
12 and &quot;show warranty&quot; for details.
13 This GDB was configured as &quot;x86_64-pc-linux-gnu&quot;.
14 Type &quot;show configuration&quot; for configuration details.
15 For bug reporting instructions, please see:
16 &lt;http://www.gnu.org/software/gdb/bugs/&gt;.
17 Find the GDB manual and other documentation resources online at:
18 &lt;http://www.gnu.org/software/gdb/documentation/&gt;.
19 For help, type &quot;help&quot;.
20 Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
21 Reading symbols from your_application...done.
22 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">break</span><span style="color:#8e44ad;"> main</span>
23 <span style="color:#7a7c7d;"># this is a comment</span>
24 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">run</span><span style="color:#8e44ad;"> &lt;arguments for your application&gt;</span>
25 ...
26 Breakpoint 1 at 0x400b56: file yourmain.cpp, line 3
27 3: int main(int argc, char* argv[])
28 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">continue</span>
29 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">backtrace</span>
30 #0 0x7f59e39bf18d in <span style="color:#8e44ad;font-weight:bold;">poll</span> () from<span style="color:#2980b9;"> /usr/lib/libc.so.6</span>
31 #1 0x7f59df6c8c7c in <span style="color:#8e44ad;font-weight:bold;">??</span> () from<span style="color:#2980b9;"> /usr/lib/libglib-2.0.so.0</span>
32 #2 0x7f59df6c8d8c in <span style="color:#8e44ad;font-weight:bold;">g_main_context_iteration</span> () from<span style="color:#2980b9;"> /usr/lib/libglib-2.0.so.0</span>
33 #3 0x7f59e480b23f in <span style="color:#27ae60;">QEventDispatcherGlib::</span><span style="color:#8e44ad;font-weight:bold;">processEvents</span>(...)
34 from<span style="color:#2980b9;"> /usr/lib/libQt5Core.so.5</span>
35 ...
36 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">where</span>
37 #0 <span style="color:#8e44ad;font-weight:bold;">main</span> (argc=1, argv=0x7fffffffca88) at<span style="color:#2980b9;"> ../../debugging/ex_debugger/main.cpp</span>:11
38 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">list</span>
39 10 bool run = true;
40 11 while (run) {
41 12 // infinite loop! can you make it quit?
42 13 }
43 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">info</span><span style="color:#8e44ad;"> locals</span>
44 app = &lt;incomplete type&gt;
45 run = true
46 complexData = {{d = 0x61d430, e = 0x61d430}}
47 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">info</span><span style="color:#8e44ad;"> scope main.cpp:12</span>
48 Scope for main.cpp:12:
49 Symbol argc is a variable at frame base reg $rbp offset 0+-8, length 4.
50 Symbol argv is a variable at frame base reg $rbp offset 0+-16, length 8.
51 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">ptype</span><span style="color:#8e44ad;"> run</span>
52 type = bool
53 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> run</span>
54 run = true
55 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">set</span><span style="color:#8e44ad;"> run = false</span>
56 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> run</span>
57 run = false
58 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> myString.size()</span>
59 42
60 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">ptype</span><span style="color:#8e44ad;"> MyType</span>
61 type = class MyType {
62 private:
63 int foo;
64 public:
65 int foo() const;
66 ...
67 }
68 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">break</span><span style="color:#8e44ad;"> QMessageLogger::warning</span>
69 Breakpoint 1 at 0x7ffff6f143f0 (8 locations)
70 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">command</span><span style="color:#8e44ad;"> 1</span>
71 Type commands for breakpoint(s) 1, one per line.
72 End with a line saying just \&quot;end\&quot;.
73 <span style="color:#8e44ad;">&gt; </span><span style="font-weight:bold;">backtrace</span>
74 <span style="color:#8e44ad;">&gt; </span><span style="font-weight:bold;">continue</span>
75 <span style="color:#8e44ad;">&gt; </span><span style="font-weight:bold;">end</span>
76 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">catch</span><span style="color:#8e44ad;"> throw </span><span style="color:#7a7c7d;"># or when an exception is thrown</span>
77 Catchpoint 2 (throw)
78 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">break</span><span style="color:#8e44ad;"> main.cpp:12 </span><span style="color:#7a7c7d;"># or when certain code is executed</span>
79 Breakpoint 3 at 0x401216: file ../../debugging/ex_debugger/main.cpp, line 12.
80 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">info</span><span style="color:#8e44ad;"> breakpoints</span>
81 Num Type Disp Enb Address What
82 1 breakpoint keep y &lt;MULTIPLE&gt;
83 1.1 y 0x7ffff6f143f0 &lt;QMessageLogger::warning(char const*, …
84 ...
85 2 breakpoint keep y 0x7ffff66d9b90 exception throw
86 3 breakpoint keep y 0x000000401216 in main(int, char**)
87 at debugging/ex_debugger/main.cpp:12
88 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">condition</span><span style="color:#8e44ad;"> 3 argc &gt; 5</span>
89 <span style="color:#7a7c7d;"># ^-- breakpoint id, see `info breakpoints` above</span>
90 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">call</span><span style="color:#8e44ad;"> myFunction()</span>
91 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">set</span><span style="color:#8e44ad;"> pagination off</span>
92 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">set</span><span style="color:#8e44ad;"> logging file /tmp/warnings.log</span>
93 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">set</span><span style="color:#8e44ad;"> logging on</span>
94 Copying output to /tmp/warnings.log.
95 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">info</span><span style="color:#8e44ad;"> threads</span>
96 Id Target Id Frame
97 2 Thread 0x7fffe10e1700 (LWP 7271) \&quot;QXcbEventReader\&quot;
98 0x7ffff0b6718d in poll () from /usr/lib/libc.so.6
99 * 1 Thread 0x7ffff7edd840 (LWP 7267) \&quot;kwrite\&quot;
100 0x7ffff0b6718d in poll () from /usr/lib/libc.so.6
101 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">thread</span>
102 <span style="color:#f67400;">[Current thread is 1 (Thread 0x7ffff7edd840 (LWP 7267))]</span>
103 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">thread</span><span style="color:#8e44ad;"> 2</span>
104 [Switching to thread 2 (Thread 0x7fffe10e1700 (LWP 9765))]
105 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">thread</span><span style="color:#8e44ad;"> apply all backtrace</span>
106 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">info</span><span style="color:#8e44ad;"> sharedlibrary</span>
107 From To Syms Read Shared Object Library
108 0x7ffff7ddbb80 0x7ffff7df5610 Yes (*) /lib64/ld-linux-x86-64.so.2
109 0x7ffff7690460 0x7ffff7ab723c Yes /opt/qt/5.5/gcc_64/lib/libQt5Gui.so.5
110 0x7ffff6efdb80 0x7ffff71af318 Yes /opt/qt/5.5/gcc_64/lib/libQt5Core.so.5
111 0x7ffff6c02f60 0x7ffff6c5f852 Yes (*) /usr/lib/libGL.so.1
112 0x7ffff69d3ac0 0x7ffff69e0931 Yes (*) /usr/lib/libpthread.so.0
113 0x7ffff66d5fa0 0x7ffff6781d89 Yes /usr/lib/libstdc++.so.6
114 0x7ffff6353510 0x7ffff63bb33a Yes (*) /usr/lib/libm.so.6
115 ...
116 (*): Shared library is missing debugging information.
117 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">list</span><span style="color:#8e44ad;"> 64</span>
118 59 * If no red can be seen, then the cached implementation is \&quot;good enough\&quot;.
119 60 */
120 61 void paintEvent(QPaintEvent *event)
121 62 {
122 63 const QRect rect = event-&gt;rect();
123 64
124 65 QPainter painter(this);
125 66 painter.setRenderHint(QPainter::Antialiasing);
126 67 painter.fillRect(rect, Qt::black);
127 68
128 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">dprintf</span><span style="color:#8e44ad;"> main.cpp:64,\&quot;paint rect(w=%d,h=%d)\\n\&quot;,rect.width(),rect.height()</span>
129 Dprintf 1 at 0x403a1e: file path/to/main.cpp, line 64.
130 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">continue</span>
131 Continuing.
132 paint rect(w=202,h=200)
133 paint rect(w=213,h=203)
134 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">target</span><span style="color:#8e44ad;"> remote &lt;device ip&gt;:&lt;port&gt;</span>
135 Remote debugging using &lt;device ip&gt;:&lt;port&gt;
136 Reading /lib64/ld-linux-x86-64.so.2 from remote target...
137 warning: File transfers from remote targets can be slow.
138 Use \&quot;set sysroot\&quot;to access files locally instead.
139 ...
140 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">set</span><span style="color:#8e44ad;"> sysroot /path/to/sysroot</span>
141 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> myMap</span>
142 $1 = QMap&lt;QString, int&gt; = {
143 [\&quot;bar\&quot;] = 1,
144 [\&quot;foo\&quot;] = 2
145 }
146 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> money</span>
147 $1 {
148 {value = 1.20000005, currency = Money::Euro},
149 {value = 3.4000001, currency = Money::Dollar}
150 }
151 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">python</span>
152 <span style="color:#3f8058;">&gt;</span> <span style="color:#27ae60;">import</span> sys
153 <span style="color:#3f8058;">&gt;</span> sys.path.insert(<span style="color:#f67400;">0</span>, <span style="color:#f44f4f;">'/path/to/addon/debugging/ex_gdb_pretty_printer'</span>)
154 <span style="color:#3f8058;">&gt;</span> <span style="color:#27ae60;">import</span> money_printer
155 <span style="color:#3f8058;">&gt;</span> <span style="font-weight:bold;">end</span>
156 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">print</span><span style="color:#8e44ad;"> money</span>
157 $2 = {
158 \&quot;1.200000 Euro\&quot;,
159 \&quot;3.400000 Dollar\&quot;
160 }
161 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">continue</span>
162 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">detach</span>
163 <span style="color:#8e44ad;">(gdb) </span><span style="font-weight:bold;">quit</span>
164 </pre></body></html>