From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3y1XDo4DRmEFTQAAWB0awg (envelope-from ) for ; Sat, 18 Sep 2021 11:19:42 -0400 Received: by simark.ca (Postfix, from userid 112) id 225701EE25; Sat, 18 Sep 2021 11:19:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 21FAB1EDDB for ; Sat, 18 Sep 2021 11:19:41 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A057A3858003 for ; Sat, 18 Sep 2021 15:19:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A057A3858003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631978380; bh=uevFt/CrCtsDdeOSGiDHPaJ6M0PaH14/xq2Ub84X0Uw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=TNWdqWAh3yCJ96a5K8OKaItiK0uGjb4DoCdjElRz1dEku7OQVKOTfj+MQOXsie7PW lC2W1vW8QvJhCL8mycjdSSmQrHsF24VC/jFk5+J22YjJ5xNsyesz6PdGmxIRo4mWVZ YZmh4kol58eKRNDZZN52hSKY8ZcQtnu7TS+XQf4k= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 16EA9385840D for ; Sat, 18 Sep 2021 15:19:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16EA9385840D 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 4E9041FFB8 for ; Sat, 18 Sep 2021 15:19:20 +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 36FB313CCC for ; Sat, 18 Sep 2021 15:19:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XszyC3gDRmF2GwAAMHmgww (envelope-from ) for ; Sat, 18 Sep 2021 15:19:20 +0000 Date: Sat, 18 Sep 2021 17:19:18 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.server/server-kill.exp with -m32 Message-ID: <20210918151917.GA13535@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.server/server-kill.exp with target board unix/-m32, I run into: ... 0xf7fd6b20 in _start () from /lib/ld-linux.so.2^M (gdb) Executing on target: kill -9 13082 (timeout = 300) builtin_spawn -ignore SIGHUP kill -9 13082^M bt^M (gdb) FAIL: gdb.server/server-kill.exp: kill_pid_of=server: test_unwind_syms: bt ... The test-case expects the backtrace command to trigger remote communication, which then should result in a "Remote connection closed" or similar. However, no remote communication is triggered, because we hit the "Check that this frame is unwindable" case in get_prev_frame_always_1. We don't hit this problem in the kill_pid_of=inferior case, because there we run to main before doing the backtrace. Fix this by doing the same in the kill_pid_of=server case. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.server/server-kill.exp with -m32 --- gdb/testsuite/gdb.server/server-kill.exp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp index 655821cc6f9..4125e5bf92d 100644 --- a/gdb/testsuite/gdb.server/server-kill.exp +++ b/gdb/testsuite/gdb.server/server-kill.exp @@ -69,11 +69,13 @@ proc prepare {} { gdbserver_run "" - if { $::kill_pid_of == "inferior" } { - # Continue past server_pid assignment. - gdb_breakpoint ${srcfile}:[gdb_get_line_number "i = 0;"] - gdb_continue_to_breakpoint "after server_pid assignment" + # Continue past server_pid assignment. We do this for both scenarios, + # to avoid doing a backtrace from _start, which may not trigger remote + # communication. + gdb_breakpoint ${srcfile}:[gdb_get_line_number "i = 0;"] + gdb_continue_to_breakpoint "after server_pid assignment" + if { $::kill_pid_of == "inferior" } { # Get the pid of GDBServer. set test "p server_pid" set server_pid 0