print *variable
If you do that it will display the value of that variable in GDB.
You also have an option to display the struct with indentation and new lines:
$1 = {
next = 0x0,
flags = {
sweet = 1,
sour = 1
},
meat = 0x54 "Pork"
}
For that you need to set the pretty print:
set print pretty on
If you want to print an array of values you do:
print *array@len