How to evaluate functions in GDB without painful typecasting?
问题 In an answer to How to evaluate functions in GDB? I found the recipe to call a function outside of my program called floor from within GDB like this: (gdb) p floor $20 = {<text variable, no debug info>} 0x38e10197b0 <floor> (gdb) p ((double(*)(double))floor)(2.9999) $21 = 2 (gdb) p ((double(*)(double))floor)(2.000001) $22 = 2 (gdb) What do I need to do, short of a compiler upgrade which is not an option for me at the moment, in order for me to call the function in the same manner in which I