开发者

How is the debug information organized and what does it contain?

开发者 https://www.devze.com 2023-01-17 01:35 出处:网络
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 be开发者

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 be开发者_如何学编程tter than nm or objdump?


The debugging information depends on the operating system - gdb uses whatever the native format is. On many UNIX-like systems, debugging information is stored in DWARF format. You can use libdwarf and dwarfdump to examine this information.

EDIT: On Linux readelf -w a.out will print all DWARF debug info contained in the executable (also works for shared libraries and object files).

0

精彩评论

暂无评论...
验证码 换一张
取 消