From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12824 invoked by alias); 1 Oct 2013 09:53:35 -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 12805 invoked by uid 89); 1 Oct 2013 09:53:34 -0000 Received: from mail-qe0-f53.google.com (HELO mail-qe0-f53.google.com) (209.85.128.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 01 Oct 2013 09:53:34 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY,NO_RELAYS autolearn=no version=3.3.2 X-HELO: mail-qe0-f53.google.com Received: by mail-qe0-f53.google.com with SMTP id jy17so4676443qeb.40 for ; Tue, 01 Oct 2013 02:53:31 -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:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=dCarR+ilw2VUIblTEl/mPiA/IAhBRml/N4OF7Ri4imE=; b=IvGm/XqK2IVLOsyZD08wu35bq4IbOscO8ZtiXGrzeKcOdRTy8UL57v6J+w8yE7bh/x fgW3smLf3vyGlvtDaTMbAZG0UnuZ7auWptyjZYnErigCRyTqtDoYRWn5+4eTiUKDLjd+ xqAKIoIovTAk7F3eUhLCcbfn2t820JmGzaAY5aQS2lMfcKF+52uKxLOIvGnsDSGHFxXt MVFdb8ty3gMyGRYzuJ35rlkCRRfmFp19Jz5WGL/Oj3YUa9hjMg1xOPFEjfYuauVmKOxB Xoh1I4fkEyAjZY8tnoRp3gNl6669B8GaZP9VtEoMh3uTpTHrf2pPetMgqpPSNKRgEdAx WPvg== X-Gm-Message-State: ALoCoQnO2dH+dr7xSjIo73IQxzn8BQjWUHszmB6VYCTLwzRN9DF+5fsE6q0pmvH6SLpGGW08NAjo X-Received: by 10.49.53.10 with SMTP id x10mr34203272qeo.46.1380621211854; Tue, 01 Oct 2013 02:53:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.87.39 with HTTP; Tue, 1 Oct 2013 02:53:11 -0700 (PDT) In-Reply-To: References: <51E4B587.70007@codesourcery.com> From: Omair Javaid Date: Tue, 01 Oct 2013 09:53:00 -0000 Message-ID: Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM To: Yao Qi Cc: gdb-patches@sourceware.org, Patch Tracking Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00022.txt.bz2 On 19 September 2013 20:30, Omair Javaid wrote: > Yao, > > Thanks for your feedback. > > Here is the testcase without my patch and breakpoint address gets > adjusted because an odd address was being used: > > (gdb) break func > warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc. > Breakpoint 1 at 0x83bc (2 locations) > (gdb) run > Starting program: > /home/linaro/omair/bug_triage/gdb-7.6/gdb/testsuite/gdb.dwarf2/dw2-ifort-= parameter > warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc. > warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc. > warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc. > warning: Breakpoint 1 address previously adjusted from 0x000083bd to 0x00= 0083bc. > > Breakpoint 1, 0x000083bc in func () > (gdb) p/x param > No symbol "param" in current context. > (gdb) FAIL: gdb.dwarf2/dw2-ifort-parameter.exp: p/x param > testcase ./gdb.dwarf2/dw2-ifort-parameter.exp completed in 0 seconds > > Can you suggest any other way to fix this issue. > > Thanks you for you help. > > > -- > Omair. > > On 16 July 2013 03:52, Yao Qi wrote: >> On 07/15/2013 06:25 PM, Omair Javaid wrote: >>> >>> gdb.dwarf2/dw2-ifort-parameter fails on ARM because the dwarf2 debug >>> information being created by gdb.dwarf2/dw2-ifort-parameter-debug.S >>> gets corrupted because LSB of function addresses is ON in Thumb mode. >>> ARM instructions are word aligned and LSB of instruction address is >>> used to determine whether code being branched to is Thumb or ARM code. >>> This patch solves the problem by decrementing function address by one >>> in thumb mode. This patch has been tested on x86_64 and arm7 machines. >> >> >> Omair, >> IMO, the last bit of "function pointer value" indicates whether the targ= et >> function is an ARM or a thumb one. The "address" should still refer to = the >> actual address, as "DWARF should tell the truth". What is wrong *withou= t* >> your patch? >> >> -- >> Yao (=E9=BD=90=E5=B0=A7) Ping? Any suggestions? I can actually add labels in c code of this test case and use those labels instead of function pointer values. Would that be fine?