About 305,000 results
Open links in new tab
  1. gdb - Find the exact address of variable Buf - Stack Overflow

    Nov 3, 2017 · The & operator will work when gdb is set to C language mode (and Objective-C). In any language mode you can use (gdb) info address buf Symbol "buf" is static storage at …

  2. GDB Command Reference - print command - VisualGDB

    Note that if your expression refers to a local variable, you need to ensure that you have selected the correct frame. You can navigate frames using the up and down commands.

  3. Can we get address of a variable in a C program using GDB?

    Aug 4, 2021 · Yes, as long as your variable isn’t optimised away. For example, using ls with debug symbols: gdb ls >>> break main >>> run >>> print argv $1 = (char **) 0x7fffffffdd78 In …

  4. Data (Debugging with GDB) - sourceware.org

    The usual way to examine data in your program is with the print command (abbreviated p), or its synonym inspect. It evaluates and prints the value of an expression of the language your …

  5. Debugging with GDB - Examining Data

    Print as an address, both absolute in hexadecimal and as an offset from the nearest preceding symbol. You can use this format used to discover where (in what function) an unknown …

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

  7. GDB - Viewing Data — Debugging documentation

    GDB - Viewing Data Learning Outcome Able to inspect variables (program state) in GDB using the print and info locals commands.

  8. Debugging with gdb - Examining Data - Apple Developer

    Expressions print and many other GDB commands accept an expression and compute its value. Any kind of constant, variable or operator defined by the programming language you are using …