About 1,820,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 …

  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 …

  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 - …

  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 …

  5. How to Print the Full Value of a Long C-String in GDB: Avoid ...

    Dec 8, 2025 · Debugging C/C++ programs often involves inspecting string variables to diagnose issues like incorrect formatting, truncation, or unexpected data. The GNU Debugger (GDB) is …

  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 …

  7. Save time in GDB: Pretty Printing - Undo

    WatchPoint Save time in GDB: Pretty Printing Pretty printing is displaying information in the terminal in such a way that the information can be understood more easily at a glance, saving …

  8. How can the result of print-like formatting be used in a gdb ...

    Mar 22, 2023 · Using GDB's Python extension, you can run any GDB command and put its output into a convenience variable, whose type will be an array of characters. You can then use this …