From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 4C76F3858C54; Sun, 8 May 2022 12:05:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C76F3858C54 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.ada/catch_ex_std.exp with remote-gdbserver-on-localhost X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: efd1a8512f9d749861498bb3e9756727cda5e230 X-Git-Newrev: c7dad3e9f9620b1dd9b7c72523513590552993b2 Message-Id: <20220508120532.4C76F3858C54@sourceware.org> Date: Sun, 8 May 2022 12:05:32 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2022 12:05:32 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc7dad3e9f962= 0b1dd9b7c72523513590552993b2 commit c7dad3e9f9620b1dd9b7c72523513590552993b2 Author: Tom de Vries Date: Sun May 8 14:05:27 2022 +0200 [gdb/testsuite] Fix gdb.ada/catch_ex_std.exp with remote-gdbserver-on-l= ocalhost =20 When running test-case gdb.ada/catch_ex_std.exp on target board remote-gdbserver-on-localhost, I run into: ... (gdb) continue^M Continuing.^M [Inferior 1 (process 15656) exited with code 0177]^M (gdb) FAIL: gdb.ada/catch_ex_std.exp: runto: run to main Remote debugging from host ::1, port 49780^M /home/vries/foo: error while loading shared libraries: libsome_package.= so: \ cannot open shared object file: No such file or directory^M ... =20 Fix this by adding the usual shared-library + remote-target helper "gdb_load_shlib $sofile". =20 Tested on x86_64-linux with native and target board remote-gdbserver-on-localhost. Diff: --- gdb/testsuite/gdb.ada/catch_ex_std.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada= /catch_ex_std.exp index 6035535d10e..2d201a77717 100644 --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp @@ -63,6 +63,10 @@ if {[gdb_compile_ada $srcfile $binfile executable $optio= ns] !=3D ""} { =20 clean_restart ${testfile} =20 +# Do whatever is necessary to make sure that the shared library is +# loaded for remote targets. +gdb_load_shlib $sofile + if {![runto_main]} then { return 0 }