From 7c9e1c8d5cfe2d8bbdef2ddcac37b99267c0db5f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 31 Jul 2008 07:38:50 +0000 Subject: [PATCH] * lib/mi-support.exp (mi_load_shlibs): New. * gdb.mi/mi-pending.exp: Use mi_load_shlibs, not gdb_load_shlibs. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.mi/mi-pending.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8c213dd669..603bc9e5b0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-07-31 Vladimir Prus + + * lib/mi-support.exp (mi_load_shlibs): New. + * gdb.mi/mi-pending.exp: Use mi_load_shlibs, not gdb_load_shlibs. + 2008-07-30 Vladimir Prus * lib/mi-support.exp (get_mi_thread_list) diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index 5e5096fc63..f5b19899f2 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -56,7 +56,7 @@ gdb_exit mi_gdb_start mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} -gdb_load_shlibs $lib_sl +mi_load_shlibs $lib_sl if [target_info exists gdb_stub] { gdb_step_for_stub; diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index d6ec624eb2..91e5b09cef 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1681,3 +1681,18 @@ proc check_mi_and_console_threads {name} { } } } + +proc mi_load_shlibs { args } { + if {![is_remote target]} { + return + } + + foreach file $args { + gdb_download $file + } + + # Even if the target supplies full paths for shared libraries, + # they may not be paths for this system. + mi_gdb_test "set solib-search-path [file dirname [lindex $args 0]]" "\^done" "" +} + -- 2.11.0