gdb/coffread: simplify stab section detection

We look for stab sections for the sole purpose of emitting a warning if
we see one.  Simplify this by using a boolean to indicate if we saw a
stab section or not.  Simplify the search to just look for sections
starting with ".stab", it should be enough for this purpose.

Also, remove the make_scoped_restore that would overwrite the stab
section vector, I'm not sure why it's there.  It seems to me like it
would cause the warning to never be shown.

Change-Id: I56323189ffdaa2d06a96d457cdd999b23efa5979
Approved-By: Tom Tromey <tom@tromey.com>
1 file changed