From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by sourceware.org (Postfix) with ESMTPS id A84883842402 for ; Sat, 4 Jul 2020 03:27:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A84883842402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dxu@dxuuu.xyz Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 76F7A91E; Fri, 3 Jul 2020 23:27:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 03 Jul 2020 23:27:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=qMuw9rbl2oohVGHWCTBSd1Hcvt 6HQ7tHvdMGwymYuB4=; b=SpEMi00QA4s/6oyC17tRdq1N+y8sgxEugfnrQV99iA 9exJMAomLpOCJ4XjFD+bc4MmWKAGlEAiM9M7CY0f4EdjXztEyZMFgWkYdrowBc9H mLecoOlYhO/BJmxeybSvJuj2pDRAwnNIAQaOUxlKY4erRH0FfaUvmDYHnQ+ayf1L Wa2gzJxnWdaiDPTRpDMmTOCX6vwhYw84AgrkRrECa+Wy4e8dx52wFzcKb0O8R2pR Pm7QLSuIs5eKZHPFvVy28zNouSMPcG2EBdM9bQ6ohvGMSo3YE70Q5F/EuXGZzZBM Sr9Ryx3wehn/BwCpXk1UmqfuFPhpmez5JMYEoD6sD7oA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=qMuw9rbl2oohVGHWC TBSd1Hcvt6HQ7tHvdMGwymYuB4=; b=CEoKv9anzDamTPx3fx2e/o1K0gBXQrNDm vezA+sOasgOOyJvIa7fGBA/57BlLyQ7W2X1PeN9zaviuC1NxwK3KRe9lLHT4VXr0 fNiQxI2brTYYoOBmWG2FnOBRl4WnWvAsvLPCxjk2UQxbFiZQy6+moruQ3rChADeD azBkTbgV72yEhB+Uhoonzc70LnCdOp30VuCvXZVQmp6l9PbmhrHUaIco8aaMlJS9 LKKkWlZSHxWmrmzQoLa8+U9Q439l9+aOIguFm9hWG2/JzhJE59o30+wO3McOQSR6 QibKC3jd11XC8tl0GduL83AbovdyvgzV6mAZFDXFUy4BuCOFz4rsQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdejgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvuf ffkffoggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceougiguhes ugiguhhuuhdrgiihiieqnecuggftrfgrthhtvghrnhepieffgfelvdffiedtleejvdetfe efiedvfeehieevveejudeiiefgteeiveeiffffnecukfhppeejfedrleefrddvgeejrddu feegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug iguhesugiguhhuuhdrgiihii X-ME-Proxy: Received: from localhost.localdomain (c-73-93-247-134.hsd1.ca.comcast.net [73.93.247.134]) by mail.messagingengine.com (Postfix) with ESMTPA id 60D5E3280059; Fri, 3 Jul 2020 23:27:57 -0400 (EDT) From: Daniel Xu To: gdb-patches@sourceware.org, tom@tromey.com Subject: [PATCH] rust: Fix rust modules test Date: Fri, 3 Jul 2020 20:27:41 -0700 Message-Id: <20200704032741.835663-1-dxu@dxuuu.xyz> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_INFOUSMEBIZ, PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sat, 04 Jul 2020 03:28:00 -0000 I noticed that the modules test was failing. Some choice use of `nm` revealed `TWENTY_THREE` was not in the final binary. Rather than trying to trick the compiler/linker by using magic flags, simply `println!()` the global. gdb/testsuite/ * gdb.rust/modules.rs: Prevent linker from discarding test symbol Signed-off-by: Daniel Xu --- gdb/testsuite/gdb.rust/modules.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/gdb.rust/modules.rs b/gdb/testsuite/gdb.rust/modules.rs index 6db082817b..dc2a469b2f 100644 --- a/gdb/testsuite/gdb.rust/modules.rs +++ b/gdb/testsuite/gdb.rust/modules.rs @@ -93,4 +93,7 @@ pub mod mod1 { fn main () { mod1::inner::innest::f1(); + + // Prevent linker from discarding `TWENTY_THREE` + println!("{}", TWENTY_THREE); } -- 2.27.0