GDB Displays Missing File Error for Library Source Code
When using GDB to debug C exceptions, users may encounter an error message indicating a missing file, such as "No such file or directory" for "raise.c." This error can occur even if the exception is handled correctly.
Solution: Obtain Library Source Code and Debug Information
To address this issue, it is necessary to obtain the source code and debug information for the relevant library, in this case, libc6. Ubuntu provides the debuginfo package for this purpose.
Steps to Debugging C Library Source Code:
Configure the package system to download source code packages:
Download source code:
Adjust GDB's source code directory:
Once these steps are completed, GDB will be able to access the correct source code and provide accurate debugging information for the exception.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3