Handle optional lines correctly in gdb.ada/complete.exp

While working on another series, I discovered that the existing code
in gdb.ada/complete.exp that conditionally accepts a completion does
not work correctly.  The code assumes that wrapping a line in "(...)?"
will make the entire line optional, but really this will only match a
blank line.

Meanwhile, I needed this same patch for a second series I'm working
on, so I've pulled this out.  As it only affects Ada, I am going to
check it in.
1 file changed