About 631,000 results
Open links in new tab
  1. c - Formatted printing in GDB - Stack Overflow

    Jan 12, 2012 · I'd like to do printf style printing from GDB. For instance, I want to print a variable value, but with some text to describe what it is. Can it be done, and if so, can you give an example?

  2. Output Formats (Debugging with GDB) - sourceware.org

    Output Formats (Debugging with GDB)By default, GDB prints a value according to its data type. Sometimes this is not what you want. For example, you might want to print a number in hex, or a …

  3. GDB Command Reference - print command

    Format If specified, allows overriding the output format used by the command. Valid format specifiers are: o - octal x - hexadecimal u - unsigned decimal t - binary f - floating point a - address c - char s - …

  4. Debugging with GDB - Print Settings - GNU

    If you have a pointer and you are not sure where it points, try `set print symbol-filename on'. Then you can determine the name and source file location of the variable where it points, using `p/a pointer'. …

  5. Debugging with GDB - Print Settings - University of Nevada, Reno

    You can use `set print address off' to eliminate all machine dependent displays from the GDB interface. For example, with print address off, you should get the same text for backtraces on all machines- …

  6. Printf-style debugging using GDB, Part 1 - Red Hat Developer

    Oct 5, 2021 · The -g option places debugging information in the binary. Also, the program is compiled without optimization. Using GDB for printf-style output Using GDB for printf-style output With the …

  7. c++ - GDB print variable in readable format (using ...

    Jul 13, 2021 · However it appears to me as if there must be a more convenient way of getting GDB to print variables in a readable format. After all I can't be the first one who comes across this situation. …

  8. How to Print in Binary Mode in GDB: Troubleshooting 'p/b' Not ...

    6 days ago · The GNU Debugger (GDB) is an indispensable tool for developers debugging C, C++, and other compiled languages. While GDB excels at inspecting variables, memory, and program flow, …