From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id B86883858C50; Tue, 18 Oct 2022 13:33:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B86883858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666099986; bh=4ZvmrqT/gc95WwuJk6s3zYLL5W3drTFvrLoT0i9wUoc=; h=From:To:Subject:Date:From; b=tLc34hHiKbc339AZZaW0BFoN/Xb5AvQxoWRpAaFJWpAW3KnY5m0o0SQmK2HWwurRg VsiTkfLDAisVaye39aMTHqXTooInZAlBSk4DAOiKVd7OIswCv63x3iwznhxdR0sT/5 Pgg5m3by6QcHi6urx9VlUM2M3xeehRHEhC4P2TKY= 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] Handle header files with local-remote-host.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 21b61fe24223da81fcc35d2dfd3893f01285e2a5 X-Git-Newrev: 0df940ee00806ce1e4d443eac27bddc2662d1897 Message-Id: <20221018133306.B86883858C50@sourceware.org> Date: Tue, 18 Oct 2022 13:33:06 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0df940ee0080= 6ce1e4d443eac27bddc2662d1897 commit 0df940ee00806ce1e4d443eac27bddc2662d1897 Author: Tom de Vries Date: Tue Oct 18 15:32:47 2022 +0200 [gdb/testsuite] Handle header files with local-remote-host.exp =20 With test-case gdb.base/included.exp and host board local-remote-host.e= xp with tentative fix for PR29697 I run into: ... included.c:18:10: fatal error: included.h: No such file or directory #include "included.h" ^~~~~~~~~~~~ compilation terminated. ... =20 Fix this by adding the missing gdb_remote_download calls. =20 Likewise in a few other test-cases. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/included.exp | 6 +++++- gdb/testsuite/gdb.base/large-frame.exp | 4 ++++ gdb/testsuite/gdb.base/line-symtabs.exp | 4 ++++ gdb/testsuite/gdb.base/sep.exp | 4 ++++ gdb/testsuite/gdb.base/shlib-call.exp | 4 ++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/included.exp b/gdb/testsuite/gdb.base/i= ncluded.exp index 336eb636ceb..a4e195b3dc1 100644 --- a/gdb/testsuite/gdb.base/included.exp +++ b/gdb/testsuite/gdb.base/included.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . =20 +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/included.h +} + standard_testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 @@ -33,4 +37,4 @@ gdb_test "ptype integer" "type =3D int" =20 # We should report that integer comes from the header file. if { $non_dwarf } { setup_xfail *-*-* } -gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/${subdir}/${testfil= e}.h:\r\n.*\tint integer;" +gdb_test "info variables integer" "\r\nFile \[^\r\n\]*${testfile}.h:\r\n.*= \tint integer;" diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.bas= e/large-frame.exp index bb33dc8880e..b58a43f81a3 100644 --- a/gdb/testsuite/gdb.base/large-frame.exp +++ b/gdb/testsuite/gdb.base/large-frame.exp @@ -15,6 +15,10 @@ # # This file is part of the gdb testsuite. =20 +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/large-frame.h +} + # This test was added to test GDB's ability to backtrace over a large # stack frame for which there is no debug information. This should # test the non-DWARF stack unwinder. diff --git a/gdb/testsuite/gdb.base/line-symtabs.exp b/gdb/testsuite/gdb.ba= se/line-symtabs.exp index aec2d5a8c0f..c5be941695b 100644 --- a/gdb/testsuite/gdb.base/line-symtabs.exp +++ b/gdb/testsuite/gdb.base/line-symtabs.exp @@ -16,6 +16,10 @@ =20 standard_testfile .c line-symtabs.h =20 +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1 } diff --git a/gdb/testsuite/gdb.base/sep.exp b/gdb/testsuite/gdb.base/sep.exp index d8b9ef7d5df..52a62a252fc 100644 --- a/gdb/testsuite/gdb.base/sep.exp +++ b/gdb/testsuite/gdb.base/sep.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . =20 +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/sep-proc.c +} + standard_testfile .c =20 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executabl= e {debug nowarnings}] !=3D "" } { diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base= /shlib-call.exp index ceef308380e..c6925709676 100644 --- a/gdb/testsuite/gdb.base/shlib-call.exp +++ b/gdb/testsuite/gdb.base/shlib-call.exp @@ -33,6 +33,10 @@ if {[skip_shlib_tests]} { return 0 } =20 +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/ss.h +} + standard_testfile shmain.c shr1.c shr2.c set srcfile ${srcdir}/${subdir}/${srcfile} set lib1src ${srcdir}/${subdir}/${srcfile2}