About 89,900 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 …

  2. GDB print all values in char array - Stack Overflow

    Apr 9, 2015 · If you have a fixed-length array and want to see all the data in there - just ask to print the array and you will get the full output, because GDB knows about the size. If you have …

  3. How to print pointer content in GDB? - Stack Overflow

    Feb 2, 2013 · That's because p is already a pointer type. In my case 0x0804b680 is just a number and when 'p /s 0x0804b680' outputs '0x0804b680'. By prefixing '*', I'm telling GDB to treat …

  4. gdb - how to view contents of an array of pointer? - Stack Overflow

    Sep 19, 2017 · I don't think gdb support printing 2D array itself, why? Because the definition of print *array@3 isn't printing the first three elements in array, instead, it is "priting *array (or …

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

  6. debugging - how to print 2d arry values in gdb - Stack Overflow

    Oct 21, 2013 · I got Cannot perform pointer math on incomplete types, try casting to a known type, or void *. I keep trying ptype optBoards I saw type = int [][0] I wildly guess optBoards …

  7. c - Displaying struct values in GDB - Stack Overflow

    Sep 27, 2012 · In GDB, given a variable that points to a struct, print will display the raw pointer value and x will display the raw bytes pointed to. Is there any way to display the data pointed …

  8. c - Print character array to file in GDB - Stack Overflow

    Jan 30, 2013 · 13 I have an array of characters with about 100k entries. It seems like when in the function I print *buffer it is getting cut off prematurely. is there anything I can do to lengthen the …

  9. gdb print hex array in single byte mode - Stack Overflow

    Sep 11, 2021 · I'm using x/20x to print binary data in gdb (gdb) x/20x 0x555555558df0 0x555555558df0: 0xfa1e0ff3 0x56415741 0x54415541 0x55fc8941 I wanted to print it in single …

  10. How to print `std::array` contents in gdb? - Stack Overflow

    Jul 20, 2013 · 2 I am not well familiar with gdb, and couldn't figure how to look for this scenario in gdb manual. I am trying to print contents of std::array in gdb. Below is the usecase I am trying …