GDB Debugging Symbol




GDB Debugging Symbol

 Gdb Debugging Symbol

Gdb Debugging Symbol

  • A Symbol Table provides the maps instructions in the compiled binary program to their corresponding variable, function, or line in the source code.
  • This mapping could be something like:
    • Program instruction ⇒ item name, item type, original file, line number defined.
  • Symbol tables may be embedded into the program or stored as a separate file. So, if you plan to debug your program, then it is required to create a symbol table which will have the required information to debug the program.

We can infer the following facts about symbol tables:

  • A symbol table works for a particular version of the program - if the program changes, a new table must be created.
  • Debug builds are often larger and slower than retail (non-debug) builds; debug builds contain the symbol table and other additional information.
  • If you wish to debug a binary program you did not compile yourself, you must get the symbol tables from the author.
  • To let GDB be able to read all that information line by line from the symbol table, we need to compile it a bit differently. Normally we compile our programs as:
    • gcc welcome.cc -o welcome
  • Instead of doing this, we need to compile with the -g flag as shown below:
    • gcc -g welcome.cc -o welcome


Related Searches to GDB Debugging Symbols

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×