From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22000 invoked by alias); 7 Oct 2014 14:03:32 -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 21982 invoked by uid 89); 7 Oct 2014 14:03:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Oct 2014 14:03:25 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1XbVMI-00009e-0w from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 07 Oct 2014 07:03:22 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.181.6; Tue, 7 Oct 2014 07:03:21 -0700 From: Yao Qi To: Subject: Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode References: <1409706936-11220-1-git-send-email-yao@codesourcery.com> <87k356lfa8.fsf@codesourcery.com> <87r3zd2hr3.fsf@codesourcery.com> <54202887.2090401@codesourcery.com> <542AB75A.7030606@codesourcery.com> Date: Tue, 07 Oct 2014 14:03:00 -0000 In-Reply-To: <542AB75A.7030606@codesourcery.com> (Yao Qi's message of "Tue, 30 Sep 2014 21:59:54 +0800") Message-ID: <8738b0ugjz.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00113.txt.bz2 Yao Qi writes: > On 09/22/2014 09:47 PM, Yao Qi wrote: >> On 09/15/2014 08:25 PM, Yao Qi wrote: >>> Subject: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode >>> >>> We see the fail in gdb.dwarf2/dwz.exp in thumb mode, >>> >>> p the_int^M >>> $2 =3D 99^M >>> (gdb) FAIL: gdb.dwarf2/dwz.exp: p the_int >>> >>> In thumb mode, the lsb of references to 'main' in the assembly >>> (produced by dwarf assember) is set, so the generated debug >>> information is incorrect. >>> >>> in this patch, we add a label main_label inside function main. Linker >>> doesn't set its lsb in thumb mode, and we can get function main's >>> address by 'main_label - $main_label_offset'. This label isn't moved >>> out of function main in both gcc and clang. >>> >>> gdb/testsuite: >>> >>> 2014-09-15 Yao Qi >>> >>> * gdb.dwarf2/main.c (main): New lable main_label. >>> * gdb.dwarf2/dwz.exp: Get the offset of main_label to main. >>> Return early if $main_label_offset is unknown. Get address >>> of main by "main_label - $main_label_offset". >>=20 >> Ping. https://sourceware.org/ml/gdb-patches/2014-09/msg00497.html >>=20 > > Ping. Ping. --=20 Yao (=E9=BD=90=E5=B0=A7)