From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106309 invoked by alias); 28 Jan 2016 11:53:42 -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 106295 invoked by uid 89); 28 Jan 2016 11:53:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1132, letter X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Jan 2016 11:53:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 013CCC0B66DF; Thu, 28 Jan 2016 11:53:37 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0SBrZ8V008021; Thu, 28 Jan 2016 06:53:36 -0500 Message-ID: <56AA013F.8010601@redhat.com> Date: Thu, 28 Jan 2016 11:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paul_Koning@Dell.com, andrew.burgess@embecosm.com CC: k.toshihito@yahoo.de, jhb@freebsd.org, gdb-patches@sourceware.org Subject: Re: [PATCH] Add a new format letter to dump instructions backward References: <1095889805.138513.1453786618993.JavaMail.yahoo@mail.yahoo.com> <20160127160420.GM3338@embecosm.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00692.txt.bz2 On 01/27/2016 07:49 PM, Paul_Koning@Dell.com wrote: > >> On Jan 27, 2016, at 11:04 AM, Andrew Burgess wrote: >> >> * Toshihito Kikuchi [2016-01-26 05:36:58 +0000]: >> >>> To answer the question from Paul, Pedro's guess is correct. I used >>> symbol's line info to solve a correct frame. And yes, this feature >>> does not work without debug information unfortunately. >> >> If there's no debug information then just looking for symbols in the >> same section would also be a reasonable guess. Most symbols appear >> between instructions, not part way through an instruction. > > Yes. But if you have no symbols either, it can still work on Alpha, or on MIPS if you disregard the Thumb instruction set, or on any number of other RISC machines where every instruction is the same size Agreed. We'd probably need to add a gdbarch hook to know whether the target architecture has variable or fixed length instruction set. That can always be done as a follow up incremental enhancement, though. Thanks, Pedro Alves