From patchwork Thu Jan 16 09:03:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omair Javaid X-Patchwork-Id: 23257 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89043202E2 for ; Thu, 16 Jan 2014 09:09:35 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 5sf3662139qeb.7 for ; Thu, 16 Jan 2014 01:09:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-subscribe:list-archive:list-post:list-help :sender:delivered-to:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-original-sender :x-original-authentication-results:content-type :content-transfer-encoding; bh=ej4nEUoFQxFjDW/S+dnwdIqKO8xtWFjY3P36S/YYl74=; b=KUpSEtPD0l9/8uTE9KyoZlmObMgm4igdPmmJ2glTY4PqIGbU1ey2y95OihoOR25U5G 5x3dJr2UjJCmOPFkWI5O/xYzoahD50SgyKdT8uLcfg6z3lBvYtzLFSwDabc7lBZQBfx4 6PqTGhKD2njt+oBDiG/ekGXsJtvllTF+qvgfELk6g0BVFwyCBbhMbgoGB+0kBVikJSZ1 h18gP4iAQ6TNZ+pckrhVVl29UusXP7AMtY+i4AjZKPn/26pbtMI1f0c/hyn+QEUj+5jW SM/LUt0q18ux4Eh2JcZp1DT5350Wlp3SYCxrXDY/qkaw5uAS6dw3smw1YvzNto9aaCNO ukSw== X-Gm-Message-State: ALoCoQkWQH55GcvYDxkut5xR1NKuody4tlzQsHVA3yY4xH0X5GZJo4Sgj9WvYUWpoDrtfB0a7YDA X-Received: by 10.58.253.33 with SMTP id zx1mr2756680vec.10.1389863374740; Thu, 16 Jan 2014 01:09:34 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.119 with SMTP id 110ls173963qgw.28.gmail; Thu, 16 Jan 2014 01:09:34 -0800 (PST) X-Received: by 10.140.48.172 with SMTP id o41mr6066389qga.16.1389863374505; Thu, 16 Jan 2014 01:09:34 -0800 (PST) Received: from mail-vb0-x230.google.com (mail-vb0-x230.google.com [2607:f8b0:400c:c02::230]) by mx.google.com with ESMTPS id j3si2858675qaf.37.2014.01.16.01.09.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 01:09:34 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::230; Received: by mail-vb0-f48.google.com with SMTP id q16so864811vbe.35 for ; Thu, 16 Jan 2014 01:09:34 -0800 (PST) X-Received: by 10.221.20.199 with SMTP id qp7mr1334783vcb.24.1389863374288; Thu, 16 Jan 2014 01:09:34 -0800 (PST) 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.59.13.131 with SMTP id ey3csp332252ved; Thu, 16 Jan 2014 01:09:33 -0800 (PST) X-Received: by 10.69.19.161 with SMTP id gv1mr8586322pbd.134.1389863373137; Thu, 16 Jan 2014 01:09:33 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ye6si6404420pbc.260.2014.01.16.01.09.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jan 2014 01:09:33 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-return-109385-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 9810 invoked by alias); 16 Jan 2014 09:09:25 -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 9795 invoked by uid 89); 16 Jan 2014 09:09:24 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_WEB, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ee0-f52.google.com Received: from mail-ee0-f52.google.com (HELO mail-ee0-f52.google.com) (74.125.83.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Jan 2014 09:09:23 +0000 Received: by mail-ee0-f52.google.com with SMTP id e53so1384347eek.11 for ; Thu, 16 Jan 2014 01:09:20 -0800 (PST) X-Received: by 10.14.108.6 with SMTP id p6mr10447405eeg.31.1389863015266; Thu, 16 Jan 2014 01:03:35 -0800 (PST) Received: from [192.168.1.102] ([182.185.178.235]) by mx.google.com with ESMTPSA id u7sm16708665eep.11.2014.01.16.01.03.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 01:03:34 -0800 (PST) Message-ID: <52D7A05F.6070304@linaro.org> Date: Thu, 16 Jan 2014 14:03:27 +0500 From: Omair Javaid User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM References: <51E4B587.70007@codesourcery.com> <5280A528.8040308@codesourcery.com> In-Reply-To: <5280A528.8040308@codesourcery.com> X-IsSubscribed: yes X-Original-Sender: omair.javaid@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 On Mon 11 Nov 2013 02:36:40 PM PKT, Yao Qi wrote: > [Sorry for being late] > > On 09/19/2013 11:30 PM, Omair Javaid wrote: >> (gdb) break func >> warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc. >> Breakpoint 1 at 0x83bc (2 locations) > > 'break func' should insert a breakpoint at an address A after the first > several instructions of function func, due to the effect of skip > prologue. Address A should be an address of a thumb instruction, so it > should be 2-byte aligned. In this case, the address should be > 0x000083bc. I'd like to check why 0x000083bd is generated, and > probably we should use gdbarch_addr_bits_remove somewhere. > There seemed no problem with how breakpoint addresses were being adjusted. This test requires to build dwarf info by hand in dw2-ifort-parameter-debug.S using compile time addresses so in case of arm (thumb mode) the least significant bits of compile time address are set to 1. For that reason 0x000083bd was being used as a breakpoint address func. This test was using that compile time address to insert breakpoint and that breakpoint was being adjusted to an instruction before the actual intended breakpoint instruction. I have just added a simple stepi test to make sure that we are in correct scope when we test for a fortran constant param. This works fine for both arm and x86. gdb/testsuite/ChangeLog: 2014-01-16 Omair Javaid * gdb.dwarf2/dw2-ifort-parameter.exp: Adds a new stepi test. --- gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp index 35fb0fa..8f49eea 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp @@ -33,4 +33,6 @@ if ![runto func] { return -1 } +gdb_test "stepi" ".*" + gdb_test "p/x param" " = 0xdeadf00d"