From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15204 invoked by alias); 16 Jan 2014 09:17:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15191 invoked by uid 89); 16 Jan 2014 09:17:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f171.google.com Received: from mail-ig0-f171.google.com (HELO mail-ig0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Jan 2014 09:17:50 +0000 Received: by mail-ig0-f171.google.com with SMTP id uy17so11106758igb.4 for ; Thu, 16 Jan 2014 01:17:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=CEMPavmOKnUVhDeQcHjltQRHDZ6rYKo5GqB3HI0+9NI=; b=lE4rBVqHw/Z7OY4uWmstGOX8jdNTfyE+IQ6rcZop4P52F1m14WWly08wUoYpNcUiIk qi5LrmnBk0pDUcnkxGGfNSGzFP0J9q5srryZGqiM9Z/DFnkn7moHf3GVhElNfuD8sWQZ rI87XObgBLdLUNlkHzGNcvTGDTciwSJKlOyEEPClavpjrbYrZsxYf4AVcY3yNum15Y5C WC5arrCb7a0jPRWeAnaRwNO6Emk9wgNgpG73vgYzLRd/4d/bZudY/esXWYXyMuqFoQ52 ibl/JptoSvK6O1DTc4K8xKZ6wnkbrl1UJpSRryUxX2TdfrsK6mLlCjbBaFgYa2nfwLTP 2MRw== X-Gm-Message-State: ALoCoQn4WOetR8I2HSaK3ZCkuQr8Wva9wCYpcaVCjCD9DROxGF+bsym4Qu4V0fU0cKjBGyPjOiWH MIME-Version: 1.0 X-Received: by 10.42.62.196 with SMTP id z4mr6807580ich.49.1389863868724; Thu, 16 Jan 2014 01:17:48 -0800 (PST) Received: by 10.64.20.52 with HTTP; Thu, 16 Jan 2014 01:17:48 -0800 (PST) In-Reply-To: <52D7A05F.6070304@linaro.org> References: <51E4B587.70007@codesourcery.com> <5280A528.8040308@codesourcery.com> <52D7A05F.6070304@linaro.org> Date: Thu, 16 Jan 2014 09:17:00 -0000 Message-ID: Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM From: Will Newton To: Omair Javaid Cc: Yao Qi , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00588.txt.bz2 On 16 January 2014 09:03, Omair Javaid wrote: > 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" ".*" > + I guess this could use a comment to explain why it is there. -- Will Newton Toolchain Working Group, Linaro