mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-03-03 19:47:13 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<h2 id="补充说明">补充说明</h2>
|
||||
<p><strong>ltrace命令</strong> 是用来跟踪进程调用库函数的情况。</p>
|
||||
<h3 id="语法">语法</h3>
|
||||
<pre><code>ltrace [option ...] [command [arg ...]]</code></pre>
|
||||
<pre><code class="language-bash">ltrace [option ...] [command [arg ...]]</code></pre>
|
||||
<h3 id="选项">选项</h3>
|
||||
<pre><code>-a 对齐具体某个列的返回值。
|
||||
<pre><code class="language-bash">-a 对齐具体某个列的返回值。
|
||||
-c 计算时间和调用,并在程序退出时打印摘要。
|
||||
-C 解码低级别名称(内核级)为用户级名称。
|
||||
-d 打印调试信息。
|
||||
@@ -28,7 +28,7 @@
|
||||
-x NAME treat the global NAME like a library subroutine.(求翻译)</code></pre>
|
||||
<h3 id="实例">实例</h3>
|
||||
<p>最基本应用,不带任何参数:</p>
|
||||
<pre><code>[guest@localhost tmp]$ ltrace ./a.out
|
||||
<pre><code class="language-bash">[guest@localhost tmp]$ ltrace ./a.out
|
||||
__libc_start_main(0x80484aa, 1, 0xbfc07744, 0x8048550, 0x8048540 <unfinished ...>
|
||||
printf("no1:%d \t no2:%d \t diff:%d\n", 10, 6, 4no1:10 no2:6 diff:4 ) = 24
|
||||
printf("no1:%d \t no2:%d \t diff:%d\n", 9, 7, 2no1:9 no2:7 diff:2 ) = 23
|
||||
@@ -36,7 +36,7 @@ printf("no1:%d \t no2:%d \t diff:%d\n", 8, 8, 0no1:8 no2:8 diff:0 ) =
|
||||
--- SIGFPE (Floating point exception) ---
|
||||
+++ killed by SIGFPE +++</code></pre>
|
||||
<p>输出调用时间开销:</p>
|
||||
<pre><code>[guest@localhost tmp]$ ltrace -T ./a.out
|
||||
<pre><code class="language-bash">[guest@localhost tmp]$ ltrace -T ./a.out
|
||||
__libc_start_main(0x80484aa, 1, 0xbf81d394, 0x8048550, 0x8048540 <unfinished ...>
|
||||
printf("no1:%d \t no2:%d \t diff:%d\n", 10, 6, 4no1:10 no2:6 diff:4 ) = 24 <0.000972>
|
||||
printf("no1:%d \t no2:%d \t diff:%d\n", 9, 7, 2no1:9 no2:7 diff:2 ) = 23 <0.000155>
|
||||
@@ -44,7 +44,7 @@ printf("no1:%d \t no2:%d \t diff:%d\n", 8, 8, 0no1:8 no2:8 diff:0 ) =
|
||||
--- SIGFPE (Floating point exception) ---
|
||||
+++ killed by SIGFPE +++</code></pre>
|
||||
<p>显示系统调用:</p>
|
||||
<pre><code>[guest@localhost tmp]$ ltrace -S ./a.out
|
||||
<pre><code class="language-bash">[guest@localhost tmp]$ ltrace -S ./a.out
|
||||
SYS_brk(NULL) = 0x9e20000
|
||||
SYS_access(0xa4710f, 4, 0xa4afc0, 0, 0xa4b644) = 0
|
||||
SYS_open("/etc/ld.so.preload", 0, 02) = 3
|
||||
|
||||
Reference in New Issue
Block a user