I had the same problem today, but instead, I had an array of pointers;
pthread_t** pthreads = (pthread_t**) malloc(//malloc args)
thread_count = 0;
while(thread_count < 10) {
pthread_t* myThread = (pthread_t*) malloc(//malloc args)
pthreads[thread_count] = myThread;
thread_count++;
}
I had trouble seeing the allocation of this memory in CLion gdb because it looked at a pointer to a pointer.
I solved this by targetting the first element of my array (pthreads[0]) and then looking at the next `n` elements from there.
To do this you need to cast the type (pthread_t*[<PLACE NUMBER HERE>]) and then use the target memory, which is pthreads[0] (i.e first element)
Note: I used `calloc` with 0 to set my `pthreads` array. This photo shows how memory was allocated correctly at position 0 in the CLion debugger.
I made this post because none of the posts above led me to the conclusion that I wrote here.
Example: [![clion gdb feature][1]][1]
[1]: