Close gdbserver in mi_gdb_exit
authorYao Qi <yao.qi@linaro.org>
Thu, 22 Sep 2016 15:04:03 +0000 (16:04 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 22 Sep 2016 15:04:03 +0000 (16:04 +0100)
commitf73842fc847e297fd44542de9601a84b4d6b28d8
treee4001c969de7f910c0032c259b7540ea1379f204
parentde6784544abc97d5e396cb1e83eda1ae09f63d40
Close gdbserver in mi_gdb_exit

In commit 6423214f (testsuite: Don't use expect_background to reap
gdbserver), we override gdb_exit in lib/gdbserver-support.exp, so
that we can close gdbserver first.  However, we don't close gdbserver
in mi_gdb_exit.  This makes a problem in my aarch64 mulit-arch testing,
in which I run some mi tests, mi-watch.exp for example, in different
variations (aarch64 and arm),

Schedule of variations:
    junor0-2
    junor0-2-arm/-marm
    junor0-2-arm/-mthumb

When the test is done in the first variation (aarch64), test case is
recompiled for arm, but GDBserver with aarch64 program is still
running.  When the second variation is started, GDB loads arm program,
but GDBserver still loads aarch64 program because the old GDBserver
process is using it.  We'll get,

47-target-select remote junor0-2:2350^M
&"warning: Selected architecture arm is not compatible with reported target architecture aarch64\n"^M
&"warning: Architecture rejected target-supplied description\n"

This patch fixes this problem by closing GDBserver in mi_gdb_exit.

gdb/testsuite:

2016-09-22  Yao Qi  <yao.qi@linaro.org>

* lib/gdbserver-support.exp: Rename mi_gdb_exit.
(gdb_exit): Rename it to ...
(gdbserver_gdb_exit): ...  Close GDBserver.
(gdb_exit): New proc, call gdbserver_gdb_exit.
(mi_gdb_exit): Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdbserver-support.exp
This page took 0.033498 seconds and 4 git commands to generate.