From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9810 invoked by alias); 16 Jan 2014 09:09:25 -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 9795 invoked by uid 89); 16 Jan 2014 09:09:24 -0000 Authentication-Results: sourceware.org; auth=none 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ej4nEUoFQxFjDW/S+dnwdIqKO8xtWFjY3P36S/YYl74=; b=Fb/XVPFQj/eulP1cfkbue2O1GxwuRkdoUPCbuEDa03FeUK/0fRJ/Heoj0X7nDd/Kzm Ji/ueMxLn5ir3eTNf5YL7xz6HXqnPG1R9uQaFNFmVFzLLrx90EzpGIt1uCA3324oEv3b DrMRqVNXzB89+7wvJ0vSBNtZinFj7ylXOaKIp7WEbFpwlkSFUO3Qm0ZM3+7xTa6/xlR8 gq0Jv9Nn90AlPcr0hM0aJ7uwtVsS20ft47hlTOzcAmLvL3R6Ep7wGS6eFvyRZIfz4vbf jIAaRqFwyjTCT71eG1x6LEb2IgCLh7B9GptnW2FPG2qF5pbWKjDZNeG7YO+W2JUK6N6S lsew== X-Gm-Message-State: ALoCoQmZlhfGt5nDkx+ePaouzKvVbQlY5Z5kZoquofA007KvllEMpwR9QUxOu7Oms/UBM75d+W5O 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 09:09:00 -0000 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00587.txt.bz2 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" -- 1.7.9.5