Suppose I have an array like
char foo[] = { 0, 1, 1, 0 };
In gdb, on an x86 machine, if I say
p (short[2])*foo
I get
{256, 1}
these are two bytes that are interpreted as shortin a small trailing order.
Is there a convenient way (like a macro) to render gdbbytearray as large trailing shorts (or any other type) instead?
source
share