From patchwork Thu Aug 21 08:22:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2482 Received: (qmail 20402 invoked by alias); 21 Aug 2014 08:26:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20358 invoked by uid 89); 21 Aug 2014 08:26:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Aug 2014 08:26:31 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XKNhT-0004Jp-V7 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 21 Aug 2014 01:26:27 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 21 Aug 2014 01:26:27 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Thu, 21 Aug 2014 01:26:26 -0700 From: Yao Qi To: Subject: [PATCH 3/3] Run dw2-var-zero-addr.exp with --readnow Date: Thu, 21 Aug 2014 16:22:18 +0800 Message-ID: <1408609338-17561-3-git-send-email-yao@codesourcery.com> In-Reply-To: <1408609338-17561-1-git-send-email-yao@codesourcery.com> References: <53D8A264.1050103@codesourcery.com> <1408609338-17561-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch is to extend dw2-var-zero-add.exp to test the case that partial symtabl is not used while full symtab is used, in order to cover the changes in patch 2/3. This patch restarts GDB with --readnow and does the same test again. gdb/testsuite: 2014-08-20 Yao Qi * gdb.dwarf2/dw2-var-zero-addr.exp: Move test into new proc test. Invoke test. Restart GDB with --readnow and invoke test again. --- gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp index 462a5f8..5e1732b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp @@ -26,6 +26,20 @@ if [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -# FAIL was: = (int *) 0x0 -# Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections -gdb_test "print &var" {No symbol "var" in current context\.} +proc test { } { + # FAIL was: = (int *) 0x0 + # Such DIE record can be produced using: gcc -fdata-sections -Wl,-gc-sections + gdb_test "print &var" {No symbol "var" in current context\.} +} + +test + +global GDBFLAGS +set saved_gdbflags $GDBFLAGS +set GDBFLAGS "$GDBFLAGS --readnow" +clean_restart ${binfile} +set GDBFLAGS $saved_gdbflags + +with_test_prefix "readnow" { + test +}