Edit 2: If it's not possible, I will award the bounty to an answer that proves it (I mean provides some credible sources that back the claim that it's not possible).
Let's say I have a pointer to an array, for example:
int arr[3];
int *p = new int[3];
I can see all the elements of arr
, but only the first element of p
. How can I see all 3 elements of p
?
I tried the various suggestions from the answers from View Array contents in QtCreator and View Array contents in Qt Creator debugger, however they didn't work for me:
I assume this is because I'm on CDB, while the other 2 questions are for GDB. Is it possible to achieve the same for CDB?
Edit: I forgot to mention, but p,3
also doesn't work.
Add into Expression Evaluator (menu Window->Views->Locals and Expressions)
(int(*)[3])p
That works fine in Qt Creator 3.2.1 Based on Qt 5.3.2 (GCC 4.9.2, 64 bit) Built on May 10 2016 at 17:53:15.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With