From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26520 invoked by alias); 14 Sep 2014 14:37:18 -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 26509 invoked by uid 89); 14 Sep 2014 14:37:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50 autolearn=no 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; Sun, 14 Sep 2014 14:37:17 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XTAvS-0005KH-4B from Yao_Qi@mentor.com ; Sun, 14 Sep 2014 07:37:14 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.181.6; Sun, 14 Sep 2014 07:37:13 -0700 From: Yao Qi To: Andreas Schwab CC: Subject: Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode References: <87siju7816.fsf@igel.home> Date: Sun, 14 Sep 2014 14:37:00 -0000 In-Reply-To: <87siju7816.fsf@igel.home> (Andreas Schwab's message of "Sun, 14 Sep 2014 13:31:33 +0200") Message-ID: <87bnqil1bb.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-09/txt/msg00484.txt.bz2 Andreas Schwab writes: >> -if { $main_length =3D=3D "" } { >> +set main_label_offset "" >> +set test "p main_label" >> +gdb_test_multiple $test $test { >> + -re ".* =3D {.*} $hex .*\r\n$gdb_prompt $" { >> + set main_label_offset $expect_out(1,string) >> + } >> +} > > This will also fail to match if assembler labels are prefixed. If you meant 'main' could be prefixed to '_main' for example, then GDB can get rid of the prefix on display. On mingw target, function 'foo' is prefixed to '_foo', but GDB still shows 'foo' rather than '_foo'. $ i686-w64-mingw32-objdump -t 2.exe | grep foo [ 64](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 1) 0x00000560 _foo Dump of assembler code from 0x401560 to 0x401565: 0x00401560 : push %ebp 0x00401561 : mov %esp,%ebp --=20 Yao (=E9=BD=90=E5=B0=A7)