If I have something like bool operator ==(const uint128& x, const uint128& y); how can I get gdb to disassemble it?
+5
A:
(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)
wrang-wrang
2009-09-16 17:43:50
Gives me "unmatched single quote." I tried it with double quotes too and no quotes, no dice.
gct
2009-09-16 17:45:54
Try it w/ "p" instead of disassemble. Then pass the address to disassemble.
wrang-wrang
2009-09-16 17:47:57
How do I get the address of the function?
gct
2009-09-16 17:49:34
Edited; see above.
wrang-wrang
2009-09-16 17:52:44
Aha, yes indeed, I was including the variable names, that's the problem. Thanks!
gct
2009-09-16 18:02:00