From patchwork Thu Mar 19 17:13:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 46052 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35FF321515 for ; Thu, 19 Mar 2015 17:14:03 +0000 (UTC) Received: by wesu56 with SMTP id u56sf13606365wes.2 for ; Thu, 19 Mar 2015 10:14:02 -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=xK53PMLCpY1tNaTuJzXXKtWJ21cdNSrU/r7/97VNA0E=; b=beJSdNhPuEn6jJuEhcj3VNKAhvh1Y4vJpRdp7Af9wMb8/qcPXN1z0l9rcLAmvuIJ5E YMLGnxbut5a8bAuLF8V1UdUVOCJNcvf5NtTPo2DpJfDd0JR/9xHEZMKTOAG9VaZJvP9n fWSQZ22Tct+LoLDHoT8GLsMUeZ9THsaxtaMmQuPUEHdcvvfrB+JzrW+RqNX/IiGEH+na lzKW/IzsfSo9J3Xai8zkj0DL3H6K+3th2pYPasYx/V/gKRLKboFdcMEbmE2PwZdHzeDu oOXOer8xrn9GXSDfbD3PxPiYA2LLrAx9U5YAtyrnobwGBNLpfQbvo+gFIHAfmd8gz5Jt NIJg== X-Gm-Message-State: ALoCoQkCFeGDtb/tBFBCRttfxUeVkNyFoAH5zKX08rZ2ephWqJAOSgTksDrhkpTT587XTMTnh9p5 X-Received: by 10.180.75.232 with SMTP id f8mr1970779wiw.0.1426785242149; Thu, 19 Mar 2015 10:14:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.97 with SMTP id p1ls100698laj.4.gmail; Thu, 19 Mar 2015 10:14:01 -0700 (PDT) X-Received: by 10.112.215.101 with SMTP id oh5mr35741808lbc.67.1426785241856; Thu, 19 Mar 2015 10:14:01 -0700 (PDT) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com. [2a00:1450:4010:c04::22f]) by mx.google.com with ESMTPS id w6si1389305lae.131.2015.03.19.10.14.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22f as permitted sender) client-ip=2a00:1450:4010:c04::22f; Received: by lbbsy1 with SMTP id sy1so57801425lbb.1 for ; Thu, 19 Mar 2015 10:14:01 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr68396380lbc.117.1426785241766; Thu, 19 Mar 2015 10:14:01 -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 h5csp526462lbj; Thu, 19 Mar 2015 10:14:01 -0700 (PDT) X-Received: by 10.66.55.68 with SMTP id q4mr161415886pap.71.1426785240126; Thu, 19 Mar 2015 10:14:00 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a10si4248013pat.40.2015.03.19.10.13.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-120931-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 90834 invoked by alias); 19 Mar 2015 17:13:39 -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 90751 invoked by uid 89); 19 Mar 2015 17:13:38 -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-pa0-f49.google.com Received: from mail-pa0-f49.google.com (HELO mail-pa0-f49.google.com) (209.85.220.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 19 Mar 2015 17:13:37 +0000 Received: by pabyw6 with SMTP id yw6so81249792pab.2 for ; Thu, 19 Mar 2015 10:13:35 -0700 (PDT) X-Received: by 10.66.142.100 with SMTP id rv4mr178902155pab.84.1426785215664; Thu, 19 Mar 2015 10:13:35 -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.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 10:13:35 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 2/3] Remove some hard-coded stuff in tests Date: Thu, 19 Mar 2015 17:13:27 +0000 Message-Id: <1426785208-18301-3-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:c04::22f 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 There are some hard-coded stuff in .s files, such as .int 0 and address offset, which isn't portable. This patch is to replace ".int 0" with nop and address offset with labels. gdb/testsuite: 2015-03-19 Yao Qi * gdb.linespec/break-asm-file0.s (func2): Use nop instead of .int 0. (func): Likewise. Add .Lfunc_1 label. Use .Lfunc_1 label. * gdb.linespec/break-asm-file1.s (func3): Use nop instead of .int 0. (func): Likewise. Use .Lfunc_1 label. --- gdb/testsuite/gdb.linespec/break-asm-file0.s | 11 ++++++----- gdb/testsuite/gdb.linespec/break-asm-file1.s | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.linespec/break-asm-file0.s b/gdb/testsuite/gdb.linespec/break-asm-file0.s index 9c9fa2e..42c4213 100644 --- a/gdb/testsuite/gdb.linespec/break-asm-file0.s +++ b/gdb/testsuite/gdb.linespec/break-asm-file0.s @@ -24,8 +24,8 @@ _func2: .type func2, %function func2: .Lbegin_func2: - .int 0 - .int 0 + nop + nop .Lend_func2: .size func2, .-func2 .globl _func @@ -35,8 +35,9 @@ _func: func: .Lbegin_func: .file 1 "a/break-asm-file0.s" - .int 0 - .int 0 + nop +.Lfunc_1: + nop .Lend_func: .size func, .-func .Lend_text1: @@ -199,7 +200,7 @@ func: .byte 0 /* DW_LNE_set_address */ .uleb128 5 .byte 2 - .4byte .Lbegin_func+2 + .4byte .Lfunc_1 .byte 3 /* DW_LNS_advance_line */ .sleb128 1 /* ... to 8 */ diff --git a/gdb/testsuite/gdb.linespec/break-asm-file1.s b/gdb/testsuite/gdb.linespec/break-asm-file1.s index 0f327b2..a1e7a42 100644 --- a/gdb/testsuite/gdb.linespec/break-asm-file1.s +++ b/gdb/testsuite/gdb.linespec/break-asm-file1.s @@ -23,16 +23,17 @@ _func3: .type func3, %function func3: .Lbegin_func3: - .int 0 - .int 0 + nop + nop .Lend_func3: .size func3, .-func3 _func: .type func, %function func: .Lbegin_func: - .int 0 - .int 0 + nop +.Lfunc_1: + nop .Lend_func: .size func, .-func .Lend_text1: @@ -225,7 +226,7 @@ func: .byte 0 /* DW_LNE_set_address */ .uleb128 5 .byte 2 - .4byte .Lbegin_func+1 + .4byte .Lfunc_1 .byte 3 /* DW_LNS_advance_line */ .sleb128 1 /* ... to 8 */