Fix fail in gdb.server/solib-list.exp
Commit Message
Yao Qi <qiyaoltc@gmail.com> writes:
> + # Unset last_loaded_file because we want GDBserver spawn
> + # ${interp_system} not ${last_loaded_file}.
> + global last_loaded_file
> + if { [info exists last_loaded_file] } {
> + unset last_loaded_file
> + }
Keith told me that I can use "-nocomplain" to avoid "info exists".
Patch is updated below,
Comments
On Fri, Jul 15, 2016 at 10:06 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> Yao Qi <qiyaoltc@gmail.com> writes:
>
> gdb/testsuite:
>
> 2016-07-14 Yao Qi <yao.qi@linaro.org>
>
> * gdb.server/solib-list.exp: Unset last_loaded_file.
I pushed it in.
@@ -71,6 +71,11 @@ foreach nonstop { 0 1 } { with_test_prefix "non-stop $nonstop" {
# displaced-stepping buffer at unmapped that time address _start.
gdb_test "set displaced-stepping off"
+ # Unset last_loaded_file because we want GDBserver spawn
+ # ${interp_system} not ${last_loaded_file}.
+ global last_loaded_file
+ unset -nocomplain last_loaded_file
+
# Note we pass ${interp_system}, the program gdbserver spawns, as
# argument here, instead of using gdb_load, because we don't want
# to download the interpreter to the target (it's already there)