About 437,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 - info address command - VisualGDB

    In order to do the reverse operation (get a symbol name from address), use the info symbol command. Examples We will demonstrate the use of the info address command using a basic …

  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. Variables (Debugging with GDB) - sourceware.org

    Here file or function is the name of the context for the static variable. In the case of file names, you can use quotes to make sure GDB parses the file name as a single word—for example, to …

  5. Debugging with GDB - Examining Data

    The variable $_ is automatically set by the x command to the last address examined (see section ). Other commands which provide a default address for x to examine also set $_ to that …

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

  7. GDB: Practical Commands and Functionalities - freecoder.dev

    Jul 21, 2024 · The show variable command in GDB is useful for displaying the current value of a variable. This command can be used to get detailed information about the state of a variable at …

  8. Debugging with GDB - Symbols - GNU

    The commands described in this chapter allow you to inquire about the symbols (names of variables, functions and types) defined in your program. This information is inherent in the text …