你如何在gdb中反汇编重载运算符?

时间:2009-09-16 17:36:52

标签: c++ gdb

如果我有类似bool operator ==(const uint128& x,const uint128& y)的东西;我怎样才能让gdb反汇编呢?

1 个答案:

答案 0 :(得分:7)

(gdb) p 'operator==(uint128 const&,uint128 const&)'
$1 = {bool (const uint128 &, const uint128 &)} 0x401040 <operator==(uint128 const&, uint128 const&)>
(gdb) disassemble $1
Dump of assembler code for function _ZeqRK7uint128S1_:
0x00401040 <_ZeqRK7uint128S1_+0>:       push   %ebp
... (elided)
0x00401066 <_ZeqRK7uint128S1_+38>:      ret    
End of assembler dump.
(gdb)