Search results
Results from the WOW.Com Content Network
The output from nm distinguishes between various symbol types. For example, it differentiates between a function that is supplied by an object module and a function that is required by it. nm is used as an aid for debugging , to help resolve problems arising from name conflicts and C++ name mangling, and to validate other parts of the toolchain .
stabs was an early format for debugging symbols on Unix-like systems. The newer DWARF format, for which formal specifications exist, has largely supplanted it. The specification allows any compatible compiler or assembler to create debug symbols in a standardized format, and for any debugger, such as the GNU Debugger (GDB), to gain access and display these symbols.
The .debug_info section of an ELF contains information generated by compilers to describe the source code while debugging by keeping symbols and its type, scope, file, line number, etc. The .debug_info [1] section is one of the main components of DWARF [2] [3] debug info files. [4] This is generated by a compiler when -g switch or its variants ...
Using the GCC compiler on Linux, the code above must be compiled using the -g flag in order to include appropriate debug information on the binary generated, thus making it possible to inspect it using GDB. Assuming that the file containing the code above is named example.c, the command for the compilation could be: $
Using the clang compiler on macOS, the code above can be compiled using the -g flag to include appropriate debug information on the binary generated—including the source code—making it easier to inspect it using LLDB. Assuming that the file containing the code above is named test.c, the command for the compilation could be:
Such information can also be used by other software tools. The information must be generated by the compiler and stored in the executable file or dynamic library by the linker. Some object file formats include debugging information, but others can use generic debugging data formats such as stabs and DWARF.
stabs (sometimes written STABS) is a debugging data format for storing information about computer programs for use by symbolic and source-level debuggers. (The information is stored in symbol table strings; hence the name "stabs".)
The minimum information contained in a symbol table used by a translator and intermediate representation (IR) includes the symbol's name and its location or address. For a compiler targeting a platform with a concept of relocatability, it will also contain relocatability attributes (absolute, relocatable, etc.) and needed relocation information for relocatable symbols.