Missing Source Code Error in GDB
Problem:
When using GDB to debug C programs that throw exceptions, users encounter an error message indicating that raise.c is missing. This error prevents full source code debugging.
Fix:
To fix this issue and enable full source code debugging in GDB, follow these steps:
1. Install Debuginfo Version of Libc6:
Ensure that the libc6-dbg package is installed on your system. This package contains the debugging information for the C library.
2. Configure Package System for Source Code Handling:
If not already configured, enable your package system to download and process source code packages by:
3. Download Source Code for C Library:
4. Locate Source Code Directory and Set GDB Path:
With these steps complete, GDB should now correctly display source code when debugging C programs.
The above is the detailed content of Why is GDB Missing Source Code When Debugging C Programs?. For more information, please follow other related articles on the PHP Chinese website!