[gdb/testsuite] Add save_target_board_info
Add a proc save_target_board_info, similar to save_vars, such that we can do:
...
save_target_board_info { multilib_flags } {
global board
set board [target_info name]
unset_board_info multilib_flags
set_board_info multilib_flags "$override_multilib_flags"
...
}
...
and use it in gdb_compile_shlib.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-12-20 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (save_target_board_info): New proc.
(gdb_compile_shlib): Use save_target_board_info.