From patchwork Thu Mar 19 17:13:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 46051 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E614021515 for ; Thu, 19 Mar 2015 17:13:54 +0000 (UTC) Received: by wevm14 with SMTP id m14sf6373137wev.0 for ; Thu, 19 Mar 2015 10:13:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=zQsfsiyVX0Lu1mkpkEiHKEEeERO27uBEJdkbeKoyPJA=; b=G8tgQUI6De7lYq/pdoYAPsbqnAVFfGUeL1vogzAYhh6rG7zW9KhI1lCJJN4o51s/11 3lkw3e7T5aZGHPpRx1CK/z/y4uvHqXfNA5umIM84hltHxJzy+dAjXmYAAYQzCS5wPEev NzWdoH47LkWiTq8SAmrA9eLzsJgb9exK85BXvRfIIuna7x/yfeLFVs6UySeWx0dnQ+3Q YQdPsRFfjyu/YPzkekxNR9jwB1pdthiiOihZFc/ul8csKVMtsy541Im72n9NaO1IKXOY 8/lYtGjdy9OBHyMtuS5S+aG3c90xWIFhXYvfqr42ESktjGzeyA/MVWueHqoQ9YFjtcGK E2ZQ== X-Gm-Message-State: ALoCoQmeN+wXm409q1gqFnOp8+fbqOQT3xfU49xstGTyfYkjznL2UKEJKlX3Jl1pUv9wClbvSs8K X-Received: by 10.112.44.167 with SMTP id f7mr9944705lbm.9.1426785234201; Thu, 19 Mar 2015 10:13:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.4 with SMTP id lc4ls301842lac.104.gmail; Thu, 19 Mar 2015 10:13:53 -0700 (PDT) X-Received: by 10.152.182.196 with SMTP id eg4mr69363998lac.70.1426785233892; Thu, 19 Mar 2015 10:13:53 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id h6si1458460laf.14.2015.03.19.10.13.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by lamx15 with SMTP id x15so67793106lam.3 for ; Thu, 19 Mar 2015 10:13:53 -0700 (PDT) X-Received: by 10.152.5.194 with SMTP id u2mr69875535lau.88.1426785233805; Thu, 19 Mar 2015 10:13:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp526399lbj; Thu, 19 Mar 2015 10:13:52 -0700 (PDT) X-Received: by 10.66.164.66 with SMTP id yo2mr176821384pab.59.1426785232460; Thu, 19 Mar 2015 10:13:52 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id v5si3889081pdo.216.2015.03.19.10.13.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-120930-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 90708 invoked by alias); 19 Mar 2015 17:13:38 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 90650 invoked by uid 89); 19 Mar 2015 17:13:37 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f171.google.com Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 19 Mar 2015 17:13:36 +0000 Received: by pdnc3 with SMTP id c3so81916693pdn.0 for ; Thu, 19 Mar 2015 10:13:34 -0700 (PDT) X-Received: by 10.66.124.227 with SMTP id ml3mr178853790pab.28.1426785214290; Thu, 19 Mar 2015 10:13:34 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ey10sm3943535pab.47.2015.03.19.10.13.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 10:13:33 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 1/3] Compile break-asm-file{0,1}.s without debug info Date: Thu, 19 Mar 2015 17:13:26 +0000 Message-Id: <1426785208-18301-2-git-send-email-qiyaoltc@gmail.com> In-Reply-To: <1426785208-18301-1-git-send-email-qiyaoltc@gmail.com> References: <1426785208-18301-1-git-send-email-qiyaoltc@gmail.com> X-IsSubscribed: yes X-Original-Sender: qiyaoltc@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com X-Google-Group-Id: 836684582541 From: Yao Qi If I add some nop into break-asm-file1.s like this, --- INDEX:/gdb/testsuite/gdb.linespec/break-asm-file1.s +++ WORKDIR:/gdb/testsuite/gdb.linespec/break-asm-file1.s @@ -31,8 +31,8 @@ _func: .type func, %function func: .Lbegin_func: - .int 0 - .int 0 + nop + nop .Lend_func: .size func, .-func .Lend_text1: I get the following error: Running gdb/testsuite/gdb.linespec/break-asm-file.exp ... gdb/testsuite/gdb.linespec/break-asm-file1.s: Assembler messages:^M gdb/testsuite/gdb.linespec/break-asm-file1.s: Fatal error: duplicate .debug_line sections break-asm-file0.s and break-asm-file1.s have already had debug information (written manually), so don't need to generate debug infor for them. gdb/testsuite: 2015-03-19 Yao Qi * gdb.linespec/break-asm-file.exp: Don't call prepare_for_testing. Call gdb_compile instead to compile each .s files without debug information. --- gdb/testsuite/gdb.linespec/break-asm-file.exp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp index c3e18dc..b2f3056 100644 --- a/gdb/testsuite/gdb.linespec/break-asm-file.exp +++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp @@ -28,11 +28,24 @@ if {![dwarf2_support]} { return 0 } -if {[prepare_for_testing ${testfile}.exp $execfile \ - [list $srcfile $asm_file1 $asm_file0] \ - {debug nowarnings optimize=-O0}]} { - untested "Skipping ${testfile}." - return +if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \ + object {debug nowarnings optimize=-O0}] != ""} { + return -1 +} + +# Compile .s files without debug information. +if {[gdb_compile ${srcdir}/${subdir}/$asm_file0 ${binfile}2.o \ + object {nodebug}] != ""} { + return -1 +} +if {[gdb_compile ${srcdir}/${subdir}/$asm_file1 ${binfile}3.o \ + object {nodebug}] != ""} { + return -1 +} + +if {[gdb_compile [list ${binfile}1.o ${binfile}2.o ${binfile}3.o] \ + "${binfile}" executable {}] != ""} { + return -1 } clean_restart $execfile