How to evaluate functions in GDB?

前端 未结 5 834
北海茫月
北海茫月 2020-12-03 01:18

I wonder why evaluate function doesn\'t work in gdb? In my source file I include, when debugging in gdb, these examples are wrong evaluations.

(gdb) p pow(3,         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 01:30

    The syntax for calling a function in gdb is

    call pow(3,2)
    

    Type

    help call
    

    at the gdb prompt for more information.

提交回复
热议问题