What is the recommended way to perform source-level debugging of system library calls?

前端 未结 1 455
终归单人心
终归单人心 2020-12-20 01:05

I have a need to debug into some calls in system libraries, to understand how the calls differ, and why one or another would be failing.

It is now common for Linux d

相关标签:
1条回答
  • 2020-12-20 01:44

    Did you try to set the debug-file-directory parameter in GDB? As per the documentation you pointed out, it should do what you want:

    set debug-file-directory directories Set the directories which gdb searches for separate debugging information files to directory. Multiple directory components can be set concatenating them by a directory separator.

    show debug-file-directory Show the directories gdb searches for separate debugging information files.

    For instance in my Fedora distribution, the directory is /usr/lib/debug.

    You can also define it at compile time with

    configure --with-separate-debug-dir=/usr/lib/debug ...
    
    0 讨论(0)
提交回复
热议问题