How do I tell gdb how long my zero-length array is?
- by Joe
Slightly oxymoronic title! Bonus points for Xcode answer but it's a gdb question.
If I have a standard, statically sized array gdb will print all its elements [and Xcode will let me browse through it] but if I have a zero length array, it won't, because it doesn't know. Obviously I can print the array indexes one by one, but I'd like a dump of the whole thing.
How do I tell gdb how much space I have allocated for the array to allow it to print the array (or to allow Xcode to view the array). Is it even possible?