How to debug standard c library functions like printf?

后端 未结 3 1843
鱼传尺愫
鱼传尺愫 2020-12-06 23:48

I wanted to debug printf function, so when I step inside the printf function (gdb debugger) it showed me this:

__printf (format=0x80484d0 \" my name is Adam\         


        
3条回答
  •  再見小時候
    2020-12-07 00:46

    Well, for the debugger to show you the code that was compiled into the binaries you're using, you need the original code somewhere.

    You don't seem to have that, so your debugger can't find it.

    Notice that you usually do not want to debug the source code of your std library functions, but only the way they are being called. For that, the usual "debug symbol" packages of your operating systems are optimal.

提交回复
热议问题