printing the entire array in gdb

Apparently, there is a simple command to print the entire array in gdb.

(gdb) p *arr@5
$6 = {10, 50, 30, 40, 20}

This prints the entire array of 5 elements. 15 years of programming and I still discovering new things!

Comments

Popular Posts