From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27261 invoked by alias); 4 Mar 2009 17:15:44 -0000 Received: (qmail 27244 invoked by uid 22791); 4 Mar 2009 17:15:43 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Mar 2009 17:15:36 +0000 Received: from spaceape10.eur.corp.google.com (spaceape10.eur.corp.google.com [172.28.16.144]) by smtp-out.google.com with ESMTP id n24HFWEo009878 for ; Wed, 4 Mar 2009 09:15:33 -0800 Received: from rv-out-0708.google.com (rvfb17.prod.google.com [10.140.179.17]) by spaceape10.eur.corp.google.com with ESMTP id n24HEUUK028694 for ; Wed, 4 Mar 2009 09:15:31 -0800 Received: by rv-out-0708.google.com with SMTP id b17so3135584rvf.20 for ; Wed, 04 Mar 2009 09:15:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.48.6 with SMTP id a6mr44407rvk.161.1236186930611; Wed, 04 Mar 2009 09:15:30 -0800 (PST) In-Reply-To: References: <20090303170422.GA15154@caradoc.them.org> Date: Wed, 04 Mar 2009 17:15:00 -0000 Message-ID: Subject: Re: What about add a interface to output the assembly codes follow inferior execution From: Doug Evans To: teawater Cc: Eli Zaretskii , drow@false.org, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00035.txt.bz2 On Tue, Mar 3, 2009 at 9:30 PM, teawater wrote: > Thanks Eli. > > I think "show-opcodes" is very good. =A0:) > > Hui > - Show quoted text - > On Wed, Mar 4, 2009 at 12:08, Eli Zaretskii wrote: >>> Date: Wed, 4 Mar 2009 10:28:48 +0800 >>> From: teawater >>> Cc: gdb ml >>> >>> When exec-disassemble is on, >>> If the $pc doesn't have the line message, gdb will output the assembly >>> code for $pc. >>> If the $pc has the line message, gdb will output the assembly codes of >>> this line. >> >> I think this is a useful feature, but we need a better name for it. >> Something like show-opcodes, for example. Thanks for explaining it more clearly. Having another word for "disassembly" seems clumsy though. ["apropos opcodes" doesn't print anything today] Plus to a new user the intent of the option is a bit vague. "disassemble-next-line" ? [that has a lot to type to become unambiguous, but it's not something the user would presumably type often, if not in .gdbinit or some such] Also, the user might want to set a limit on the number of lines of disassembly displayed. If cut short gdb could print "[output cut short due to `set dissemble-next-line-max 10']" (or some such). For debugging optimized code, maybe it'd be nice if gdb determined there were more (discontiguous) lines of disassembly to display for the current source line and notified the user (by printing "discontiguous source line" or some such) before and/or after the output.