From patchwork Tue Mar 28 15:48:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 67031 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF01038708A4 for ; Tue, 28 Mar 2023 15:50:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF01038708A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680018644; bh=J4SDcAqPo10GaDSeKeEUj+R9IP0lgAcLeN/Fy1YcciQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qrxbqVT0XJmLDANuZLFL/F/ceirfbzvKNfbHZMLxUCFs47KrYCOvlh0X/N3QPOYIl Qw6Hu97XyVA660pzrQkkWsmk5whCfQKbSDzSGI5hi0Ol1Js6pBtNqJBEeN3D4Aw4NJ 0m0g+v9x53P7+h2lToaY6pOw/sK1vJy3QRtFOiIk= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 420193858C39 for ; Tue, 28 Mar 2023 15:48:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 420193858C39 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-out2.suse.de (Postfix) with ESMTPS id 75F601FDA1 for ; Tue, 28 Mar 2023 15:48:53 +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 628BD1390B for ; Tue, 28 Mar 2023 15:48:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OHTsFmUMI2TfJgAAMHmgww (envelope-from ) for ; Tue, 28 Mar 2023 15:48:53 +0000 To: gdb-patches@sourceware.org Subject: [pushed 6/6] [gdb/testsuite] Fix gdb.server/server-kill-python.exp for remote host Date: Tue, 28 Mar 2023 17:48:55 +0200 Message-Id: <20230328154855.32238-7-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230328154855.32238-1-tdevries@suse.de> References: <20230328154855.32238-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Fix test-case gdb.server/server-kill-python.exp for remote host using gdb_remote_download. Tested on x86_64-linux. --- gdb/testsuite/gdb.server/server-kill-python.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp index f6b373065a8..ae85791c770 100644 --- a/gdb/testsuite/gdb.server/server-kill-python.exp +++ b/gdb/testsuite/gdb.server/server-kill-python.exp @@ -31,6 +31,7 @@ if {[build_executable "failed to prepare" ${testfile} \ } set target_binfile [gdb_remote_download target $binfile] +set host_binfile [gdb_remote_download host $binfile] # Start gdbserver. set res [gdbserver_spawn "${target_binfile}"] @@ -47,6 +48,7 @@ puts $fd \ "import gdb def do_gdb_stuff (): + gdb.execute ('file $host_binfile') gdb.execute ('target $gdbserver_protocol $gdbserver_gdbport') gdb.execute ('break $srcfile:$break_linenr') gdb.execute ('continue') @@ -56,10 +58,12 @@ def do_gdb_stuff (): do_gdb_stuff()" close $fd +set host_file1 [gdb_remote_download host $file1] + # Now start GDB, sourcing the python command file we generated above. # Set the height and width so we don't end up at a paging prompt. if {[gdb_spawn_with_cmdline_opts \ - "-quiet -iex \"set height 0\" -iex \"set width 0\" -ex \"source $file1\""] != 0} { + "-quiet -iex \"set height 0\" -iex \"set width 0\" -ex \"source $host_file1\""] != 0} { fail "spawn" return }