From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25936 invoked by alias); 19 Sep 2013 15:31:10 -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 25926 invoked by uid 89); 19 Sep 2013 15:31:09 -0000 Received: from mail-ob0-f170.google.com (HELO mail-ob0-f170.google.com) (209.85.214.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 19 Sep 2013 15:31:09 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY,KHOP_THREADED,NO_RELAYS autolearn=no version=3.3.2 X-HELO: mail-ob0-f170.google.com Received: by mail-ob0-f170.google.com with SMTP id va2so10056876obc.15 for ; Thu, 19 Sep 2013 08:31:07 -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=lFguMLNScZn/dB/LdDW0aK9uudjDGH+clv2V7KoTHU0=; b=QE9222v0gpJPCA8pxMmivCQe4w9ieTZCJ7sBp6RrTqYIJJBO2rLp6VcL7NC0Xt0O3B rQNw9Y9yFWgKJGfiUbt80LLYcXp4PN64aIAHNMhUMgwUZrQN3EXZmPmM+9LvBMk0PVyU HwHzpmzcR2DKECzFeH4+zxly5uev0KY6rc1w7VBLwqQ4hYyKbJTu3J6DGHIpoCfE8n6J FPHq/s5dl8SVX1EIOWvdpuWsKZncOA5CuNShDpypRJf/Z72rWm4ulnNawdXjEPVe6sUd C+orydkXhp1Fu2lz0r/2vkYsVZthEWKlTLpPOzXkuwpmnHu8CtJ4yno9mhgS66QaTnoQ DJ2A== X-Gm-Message-State: ALoCoQkhnw1TbcrseywBQ6PJQDcs5cA6UzPSVut/89nFSJzy99I3WueLvp8yM62ultPbl3ayPtWq X-Received: by 10.182.29.233 with SMTP id n9mr1692705obh.38.1379604667282; Thu, 19 Sep 2013 08:31:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.137.135 with HTTP; Thu, 19 Sep 2013 08:30:47 -0700 (PDT) In-Reply-To: <51E4B587.70007@codesourcery.com> References: <51E4B587.70007@codesourcery.com> From: Omair Javaid Date: Thu, 19 Sep 2013 15:31: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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00690.txt.bz2 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-pa= rameter 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 0x0000= 83bc. 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 target > function is an ARM or a thumb one. The "address" should still refer to t= he > actual address, as "DWARF should tell the truth". What is wrong *without* > your patch? > > -- > Yao (=E9=BD=90=E5=B0=A7)