-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfo_sources.htm
70 lines (58 loc) · 2.64 KB
/
info_sources.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Referensi Perintah GDB - Perintah info sources</title>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="main">
<h2>Perintah info sources</h2>
<p>Menampilkan daftar file sumber yang disebutkan dalam simbol yang dimuat.</p>
<h4>Sintaks</h4>
<div class="syntax">
<b>info</b> sources<br/>
</div>
<p></p>
<h4>Contoh</h4>
<p>Kami akan menunjukkan penggunaan perintah <b>info sources</b> dengan program C++ dasar yang menyertakan header <b>iostrean</b> dengan beberapa kode inline:</p>
<pre>
<code>
#include <iostream>
int main(int argc, char **argv)
{
std::cout << "Hello!" << std::endl;
return 0;
}
</code>
</pre>
<p>Perhatikan bagaimana memulai program menghasilkan pembacaan simbol untuk berbagai pustaka sistem dan menambahkan lebih banyak file sumber ke daftar:</p>
<pre>
<code>
(gdb) info sources
Source files for which symbols have been read in:
Source files for which symbols will be read in on demand:
/usr/include/c++/4.8/iostream, /home/bazis/test.cpp
(gdb) start
Temporary breakpoint 1 at 0x80486b6: file test.cpp, line 5.
Starting program: /home/bazis/test
Temporary breakpoint 1, main (argc=1, argv=0xbffff064) at test.cpp:5
5 std::cout << "Hello!" << std::endl;
(gdb) info sources
Source files for which symbols have been read in:
/home/bazis/test.cpp, /home/bazis/<built-in>, /usr/include/wctype.h, /usr/include/i386-linux-gnu/c++/4.8/bits/atomic_word.h, ...
Source files for which symbols will be read in on demand:
/usr/include/c++/4.8/iostream, /build/buildd/eglibc-2.17/time/../sysdeps/unix/syscall-template.S,
/build/buildd/eglibc-2.17/string/../sysdeps/i386/i686/multiarch/../../rawmemchr.S, ...
</code>
</pre>
<p></p>
<p>Perhatikan bagaimana simbol libc merujuk pada sumber di direktori /build/buildd yang ada di mesin tempat libc dibangun.</p>
<p></p>
</div>
</div>
</div>
</div>
</body>
</html>