gdb: use a range based for loop when iterating over an array

Make use of a range based for loop to iterate over a static global
array, removing the need to have a null entry at the end of the
array.

There should be no user visible changes after this commit.
1 file changed