gdb:反汇编代码中对“ test”的调用是什么?

时间:2018-10-22 13:36:07

标签: gdb disassembly

查看gdb中反汇编的代码时,会有一行

 test   %r13,%r13

但是代码中没有任何对“测试”的引用。

   0x00002b514569f56f <+95>:    cmpq   $0x0,0x8(%rbx)
   0x00002b514569f574 <+100>:   mov    %rbx,-0x70(%rbp)
   0x00002b514569f578 <+104>:   movq   $0x0,-0x68(%rbp)
   0x00002b514569f580 <+112>:   je     0x2b514569f58b <myTest+123>
   0x00002b514569f582 <+114>:   lea    -0x70(%rbp),%rdi
   0x00002b514569f586 <+118>:   callq  0x2b514591bf90 <_ZN25WeakPreserve>
   0x00002b514569f58b <+123>:   nop
   0x00002b514569f58c <+124>:   test   %r13,%r13
=> 0x00002b514569f58f <+127>:   mov    (%r15),%r14
   0x00002b514569f592 <+130>:   je     0x2b514569f700 <jni_SetObjectArrayElement+496>
   0x00002b514569f598 <+136>:   mov    0x0(%r13),%r13
   0x00002b514569f59c <+140>:   test   %r12d,%r12d
   0x00002b514569f59f <+143>:   js     0x2b514569f638 <

此“测试”与什么有关,既然出现了几次,是否总是意味着同一件事?

1 个答案:

答案 0 :(得分:2)

test是汇编指令,就像您也看到的je,lea,callq,mov指令一样