我可以取消gdb中的特定语句吗?

我可以取消gdb中的特定语句吗?,gdb,Gdb,与上面一样,下一条语句是conf.log=log,我怎么能拒绝呢 我只是尝试了disas,但是gdb将反汇编所有当前函数(我不需要太多) (gdb)disas 函数ngx_init_cycle的汇编程序代码转储: 0x0000000000417c7c:推送%rbp 0x0000000000417c7d:mov%rsp%rbp 0x0000000000417c80:推送%rbx 0x0000000000417c81:低于$0x258,%rsp 0x0000000000417c88:mov%rdi,

与上面一样,下一条语句是
conf.log=log,我怎么能拒绝呢

我只是尝试了
disas
,但是gdb将反汇编所有当前函数(我不需要太多)

(gdb)disas
函数ngx_init_cycle的汇编程序代码转储:
0x0000000000417c7c:推送%rbp
0x0000000000417c7d:mov%rsp%rbp
0x0000000000417c80:推送%rbx
0x0000000000417c81:低于$0x258,%rsp
0x0000000000417c88:mov%rdi,-0x228(%rbp)
0x0000000000417c8f:callq 0x42b2fc
0x0000000000417c94:mov 0x2B000E5(%rip),%rax#0x6c7d80
0x0000000000417c9b:mov%rax,-0x88(%rbp)
0x0000000000417ca2:mov-0x88(%rbp),%rax
0x0000000000417ca9:movq$0x0,(%rax)
0x0000000000417cb0:callq 0x4149e7
0x0000000000417cb5:mov-0x228(%rbp),%rax
0x0000000000417cbc:mov 0x10(%rax),%rax
0x0000000000417cc0:mov%rax,-0x90(%rbp)
0x0000000000417cc7:mov-0x90(%rbp),%rsi
0x0000000000417cce:mov$0x4000,%edi
0x0000000000417cd3:callq 0x405c6c
0x0000000000417cd8:mov%rax,-0x80(%rbp)
0x0000000000417cdc:cmpq$0x0,-0x80(%rbp)
---键入以继续,或键入q以退出--q
更新

(gdb) disas
Dump of assembler code for function ngx_init_cycle:
0x0000000000417c7c <ngx_init_cycle+0>:  push   %rbp
0x0000000000417c7d <ngx_init_cycle+1>:  mov    %rsp,%rbp
0x0000000000417c80 <ngx_init_cycle+4>:  push   %rbx
0x0000000000417c81 <ngx_init_cycle+5>:  sub    $0x258,%rsp
0x0000000000417c88 <ngx_init_cycle+12>: mov    %rdi,-0x228(%rbp)
0x0000000000417c8f <ngx_init_cycle+19>: callq  0x42b2fc <ngx_timezone_update>
0x0000000000417c94 <ngx_init_cycle+24>: mov    0x2b00e5(%rip),%rax        # 0x6c7d80 <ngx_cached_time>
0x0000000000417c9b <ngx_init_cycle+31>: mov    %rax,-0x88(%rbp)
0x0000000000417ca2 <ngx_init_cycle+38>: mov    -0x88(%rbp),%rax
0x0000000000417ca9 <ngx_init_cycle+45>: movq   $0x0,(%rax)
0x0000000000417cb0 <ngx_init_cycle+52>: callq  0x4149e7 <ngx_time_update>
0x0000000000417cb5 <ngx_init_cycle+57>: mov    -0x228(%rbp),%rax
0x0000000000417cbc <ngx_init_cycle+64>: mov    0x10(%rax),%rax
0x0000000000417cc0 <ngx_init_cycle+68>: mov    %rax,-0x90(%rbp)
0x0000000000417cc7 <ngx_init_cycle+75>: mov    -0x90(%rbp),%rsi
0x0000000000417cce <ngx_init_cycle+82>: mov    $0x4000,%edi
0x0000000000417cd3 <ngx_init_cycle+87>: callq  0x405c6c <ngx_create_pool>
0x0000000000417cd8 <ngx_init_cycle+92>: mov    %rax,-0x80(%rbp)
0x0000000000417cdc <ngx_init_cycle+96>: cmpq   $0x0,-0x80(%rbp)
---Type <return> to continue, or q <return> to quit---q
(gdb)信息行98
“src/os/unix/ngx_process_cycle.c”的第98行从地址0x42f6f3开始
并在0x42f704处结束。
(gdb)disas 0x42f6f3,0x42f704
函数ngx_master_process_cycle的汇编程序代码转储:
0x000000000042f6d4:推送%rbp
0x000000000042f6d5:mov%rsp,%rbp
0x000000000042f6d8:推送%rbx
0x000000000042f6d9:sub$0x128,%rsp
0x000000000042f6e0:mov%rdi,-0x108(%rbp)
0x000000000042f6e7:lea-0xe0(%rbp),%rdi
0x000000000042f6ee:callq 0x402988
0x000000000042f6f3:lea-0xe0(%rbp),%rdi
0x000000000042f6fa:mov$0x11,%esi
0x000000000042f6ff:callq 0x402878
0x000000000042f704:lea-0xe0(%rbp),%rdi
0x000000000042f70b:mov$0xe,%esi
0x000000000042f710:callq 0x402878
0x000000000042f715:lea-0xe0(%rbp),%rdi
0x000000000042f71c:mov$0x1d,%esi
0x000000000042f721:callq 0x402878
0x000000000042f726:lea-0xe0(%rbp),%rdi
0x000000000042f72d:mov$0x2,%esi
0x000000000042f732:callq 0x402878
---键入以继续,或键入q以退出---

尝试以下效果:

(gdb) info line 98
Line 98 of "src/os/unix/ngx_process_cycle.c" starts at address 0x42f6f3 <ngx_master_process_cycle+31>
   and ends at 0x42f704 <ngx_master_process_cycle+48>.
(gdb) disas 0x42f6f3,0x42f704
Dump of assembler code for function ngx_master_process_cycle:
0x000000000042f6d4 <ngx_master_process_cycle+0>:    push   %rbp
0x000000000042f6d5 <ngx_master_process_cycle+1>:    mov    %rsp,%rbp
0x000000000042f6d8 <ngx_master_process_cycle+4>:    push   %rbx
0x000000000042f6d9 <ngx_master_process_cycle+5>:    sub    $0x128,%rsp
0x000000000042f6e0 <ngx_master_process_cycle+12>:   mov    %rdi,-0x108(%rbp)
0x000000000042f6e7 <ngx_master_process_cycle+19>:   lea    -0xe0(%rbp),%rdi
0x000000000042f6ee <ngx_master_process_cycle+26>:   callq  0x402988 <sigemptyset@plt>
0x000000000042f6f3 <ngx_master_process_cycle+31>:   lea    -0xe0(%rbp),%rdi
0x000000000042f6fa <ngx_master_process_cycle+38>:   mov    $0x11,%esi
0x000000000042f6ff <ngx_master_process_cycle+43>:   callq  0x402878 <sigaddset@plt>
0x000000000042f704 <ngx_master_process_cycle+48>:   lea    -0xe0(%rbp),%rdi
0x000000000042f70b <ngx_master_process_cycle+55>:   mov    $0xe,%esi
0x000000000042f710 <ngx_master_process_cycle+60>:   callq  0x402878 <sigaddset@plt>
0x000000000042f715 <ngx_master_process_cycle+65>:   lea    -0xe0(%rbp),%rdi
0x000000000042f71c <ngx_master_process_cycle+72>:   mov    $0x1d,%esi
0x000000000042f721 <ngx_master_process_cycle+77>:   callq  0x402878 <sigaddset@plt>
0x000000000042f726 <ngx_master_process_cycle+82>:   lea    -0xe0(%rbp),%rdi
0x000000000042f72d <ngx_master_process_cycle+89>:   mov    $0x2,%esi
0x000000000042f732 <ngx_master_process_cycle+94>:   callq  0x402878 <sigaddset@plt>
---Type <return> to continue, or q <return> to quit---
(gdb)信息行12
“test.c”的第12行从地址0x4004f4开始
并在0x4004fe处结束。
(gdb)disas 0x4004f4,0x4004fe
将汇编程序代码从0x4004f4转储到0x4004fe:
0x0000000000404F4:mov$0x0,%eax
0x0000000000404F9:callq 0x4004d0
汇编程序转储结束。
或:

(gdb) info line 12
Line 12 of "test.c" starts at address 0x4004f4 <main+24>
   and ends at 0x4004fe <main+34>.

(gdb) disas 0x4004f4,0x4004fe
Dump of assembler code from 0x4004f4 to 0x4004fe:
   0x00000000004004f4 <main+24>:    mov    $0x0,%eax
   0x00000000004004f9 <main+29>:    callq  0x4004d0 <bp3>
End of assembler dump.
(gdb)disas main+24,main+34
将汇编程序代码从0x4004f4转储到0x4004fe:
0x0000000000404F4:mov$0x0,%eax
0x0000000000404F9:callq 0x4004d0
汇编程序转储结束。

不确定是否有更自动的方法。

@cpuer尝试用空格代替逗号,似乎自7.1以来反汇编命令发生了不兼容的更改,+offset语法自7.2以来是新的
(gdb) info line 12
Line 12 of "test.c" starts at address 0x4004f4 <main+24>
   and ends at 0x4004fe <main+34>.

(gdb) disas 0x4004f4,0x4004fe
Dump of assembler code from 0x4004f4 to 0x4004fe:
   0x00000000004004f4 <main+24>:    mov    $0x0,%eax
   0x00000000004004f9 <main+29>:    callq  0x4004d0 <bp3>
End of assembler dump.
(gdb) disas main+24,main+34
Dump of assembler code from 0x4004f4 to 0x4004fe:
   0x00000000004004f4 <main+24>:    mov    $0x0,%eax
   0x00000000004004f9 <main+29>:    callq  0x4004d0 <bp3>
End of assembler dump.