-# Copyright 2009-2015 Free Software Foundation, Inc.
+# Copyright 2009-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
return -1
}
- set testpid [spawn_wait_for_attach $binfile]
+ set test_spawn_id [spawn_wait_for_attach $binfile]
+ set testpid [spawn_id_get_pid $test_spawn_id]
remote_exec build "mv -f ${binfile_lib1} ${binfile_lib1}-running"
remote_exec build "mv -f ${binfile_lib2} ${binfile_lib2}-running"
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib1} $lib_flags] != ""
|| [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""} {
untested "Could not recompile ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
- remote_exec build "kill -9 ${testpid}"
+ kill_wait_spawned_process $test_spawn_id
return -1
}
clean_restart ${binfile_base}
# This testcase currently does not support remote targets.
- # gdb_load_shlibs ${binfile_lib1} ${binfile_lib2}
+ # gdb_load_shlibs ${binfile_lib1}
+ # gdb_load_shlibs ${binfile_lib2}
# Here we should get:
# warning: .dynamic section for ".../solib-overlap-lib1.so" is not at the expected address (wrong library or version mismatch?)
sleep 5
- remote_exec build "kill -9 ${testpid}"
+ kill_wait_spawned_process $test_spawn_id
}}