How is the debug information organized in a compiled C/C++ program?
What does it contain?
How is the debug information used by the debugger, e.g. gdb, and how can I read the debug information better than nm or objdump?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The debugging information depends on the operating system –
gdbuses whatever the native format is. On many UNIX-like systems, debugging information is stored inDWARFformat. You can uselibdwarfanddwarfdumpto examine this information.EDIT: On Linux
readelf -w a.outwill print allDWARFdebug info contained in the executable (also works for shared libraries and object files).