About 729,000 results
Open links in new tab
  1. How to view a pointer like an array in GDB? - Stack Overflow

    Jul 20, 2018 · It first casts p to a pointer-to-array type (instead of pointer-to-element type pointing to the first element), then dereferences that pointer to get an array object. In C, this would decay back to a …

  2. How to View a Pointer as an Array in GDB When Passed as a ...

    This blog post will guide you through step-by-step methods to view a pointer as an array in GDB, even when it’s passed as a function parameter. We’ll cover essential GDB commands, practical examples, …

  3. Arrays (Debugging with GDB) - sourceware.org

    It is often useful to print out several successive objects of the same type in memory; a section of an array, or an array of dynamically determined size for which only a pointer exists in the program.

  4. Debugging with gdb - Examining Data - Apple Developer

    Set a limit on how many elements of an array GDB will print. If GDB is printing a large array, it stops printing after it has printed the number of elements set by the set print elements command.

  5. 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'. …

  6. Debugging with pretty printers in GDB – part 2 - Undo

    Since we selected the “array” display hint, this will automatically reflect preferences for printing arrays (as set by set print array). The printer we’ve built will automatically walk a list of arbitrary length; with …

  7. Evaluating pointers as arrays · Issue #64 · rohanrhu/gdb-frontend

    Mar 31, 2024 · The syntax is *ptr@NUM_OF_ITEMS. (The first evaluator window is a pointer evaluated and you can't see it as an array but the second one it is casted into an array.) GDB doesn't know that …

  8. c++ - How to print content of a list of pointers in gdb ...

    Mar 25, 2015 · (gdb) python > for i in range(nnn): > print x[i].dereference() > end You can wrap this in a new gdb command, written in Python, pretty easily. Another way is to use define to make your own …