gdb: fix some flake8 F824 warnings

flake8 7.2.0 appears to have this new warning:

    F824: global name / nonlocal name is unused: name is never assigned in scope

It points out a few places in our code base where "global" is not
necessary, fix them.

Change-Id: Ia6fb08686977559726fefe2a5bb95d8dcb298bb0
Approved-By: Tom Tromey <tom@tromey.com>
12 files changed