From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 87EB83858C54 for ; Sun, 8 May 2022 12:05:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 87EB83858C54 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BACAE21BB4 for ; Sun, 8 May 2022 12:05:57 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A207213A97 for ; Sun, 8 May 2022 12:05:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3ma1JSWyd2LrQgAAMHmgww (envelope-from ) for ; Sun, 08 May 2022 12:05:57 +0000 Date: Sun, 8 May 2022 14:05:56 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.ada/catch_ex_std.exp with remote-gdbserver-on-localhost Message-ID: <20220508120554.GA7567@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2022 12:05:59 -0000 Hi, 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 ... Fix this by adding the usual shared-library + remote-target helper "gdb_load_shlib $sofile". Tested on x86_64-linux with native and target board remote-gdbserver-on-localhost. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.ada/catch_ex_std.exp with remote-gdbserver-on-localhost --- 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 $options] != ""} { clean_restart ${testfile} +# 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 }