简体   繁体   中英

How to make gdb step-into operation in standard library C/C++ function?

Recently I have faced an interesting problem. When I use gdb for code search, I can move inside any function which I defined, by step-into. But when I try to do it for standard C function (eg printf() ) I see only binary form of source code.

How can I ask gdb to show human-readable source code? I am very interested in the work of standard functions.Thank you!

You have to:

  • Install the debug versions of the standard C and C++ libraries
  • Tell the compiler to link against those versions

If you are on Linux and have GCC as your compiler, you can look up this post about how to do the second bullet above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM