[gdb/testsuite] Add save_target_board_info
authorTom de Vries <tdevries@suse.de>
Sun, 20 Dec 2020 08:35:36 +0000 (09:35 +0100)
committerTom de Vries <tdevries@suse.de>
Sun, 20 Dec 2020 08:35:36 +0000 (09:35 +0100)
commitc541fa7c91ce9d73d6a997cedf2cdc65e35dc139
tree2b9058d2af8ee2329b2bb23b3b310680bc317bf0
parent3dc9a557a1e2bdc89443ed91ae5a3cf6699ff97e
[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.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp