gdb.base/setshow.exp: use save_vars to save/restore gdb_prompt
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 6 Jul 2021 17:31:12 +0000 (13:31 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 23 Jul 2021 19:38:53 +0000 (15:38 -0400)
commitffb6ba773e0a5ad9884afdc3b8279671c61d5add
tree615de6bf849fe15c0735eefdbece6e9a5b87ff60
parenta52b41bf2f08f6c106983f1acca2c8a2f69279b0
gdb.base/setshow.exp: use save_vars to save/restore gdb_prompt

Using save_vars is a bit better than what we have now, as it ensures the
variable gets restored if the code within it throws an error.

Change-Id: I3bd6836e5b7efb61b078acadff1a1c8182c19a27
gdb/testsuite/gdb.base/setshow.exp