Use target_sim_options when selecting sim as target
Commit Message
Hi,
The following patch uses target_sim_options from the board info when
selecting the sim target. This is set in some of the sim baseboards, and can
be needed to configure the simulator appropriately.
Cheers,
Jon
2016-0-09 Jon Beniston <jon@beniston.com>
* gdb/testsuite/lib/mi-support.exp (mi_gdb_target_load): Use
target_sim_options for sim target.
Comments
On 08/09/2016 05:33 PM, Jon Beniston wrote:
> Hi,
>
> The following patch uses target_sim_options from the board info when
> selecting the sim target. This is set in some of the sim baseboards, and can
> be needed to configure the simulator appropriately.
Looks obvious, given that the corresponding CLI code already
does the same thing.
> 2016-0-09 Jon Beniston <jon@beniston.com>
(Typo in date.)
>
> * gdb/testsuite/lib/mi-support.exp (mi_gdb_target_load): Use
> target_sim_options for sim target.
Note there's a ChangeLog file in gdb/testsuite/. So please write the
path relative to the corresponding ChangeLog file:
gdb/testsuite/ChangeLog:
2016-08-09 Jon Beniston <jon@beniston.com>
* lib/mi-support.exp (mi_gdb_target_load): ...
OK with that change.
Thanks,
Pedro Alves
b/gdb/testsuite/lib/mi-support.exp
@@ -602,8 +602,9 @@ proc mi_gdb_target_load { } {
}
}
} elseif { [target_info protocol] == "sim" } {
+ set target_sim_options "[board_info target gdb,target_sim_options]"
# For the simulator, just connect to it directly.
- send_gdb "47-target-select sim\n"
+ send_gdb "47-target-select sim $target_sim_options\n"
gdb_expect $loadtimeout {
-re "47\\^connected.*$mi_gdb_prompt$" {
}