From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26362 invoked by alias); 5 Mar 2009 02:42:04 -0000 Received: (qmail 26346 invoked by uid 22791); 5 Mar 2009 02:42:03 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Mar 2009 02:41:53 +0000 Received: by ti-out-0910.google.com with SMTP id y8so3395958tia.12 for ; Wed, 04 Mar 2009 18:41:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.110.14.12 with SMTP id 12mr935615tin.15.1236220909092; Wed, 04 Mar 2009 18:41:49 -0800 (PST) In-Reply-To: References: <20090303170422.GA15154@caradoc.them.org> <20090304192647.GA21091@caradoc.them.org> Date: Thu, 05 Mar 2009 02:42:00 -0000 Message-ID: Subject: Re: What about add a interface to output the assembly codes follow inferior execution From: teawater To: tromey@redhat.com, Eli Zaretskii , Doug Evans , Pedro Alves , Daniel Jacobowitz Cc: gdb ml Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00050.txt.bz2 Thanks guys, For the people that want extend disassemble: Output assembly codes of next-line is just one part of this idea. We still have another part: 1. Auto mode, output assembly codes only if there is not line message for current pc. For example: (gdb) si 0x080483ee 24 b =3D printf ("a =3D %d b =3D %d c =3D %d\n= ", a, b, c); (gdb) si 0x080482d8 in printf@plt () Current language: auto; currently asm 0x080482d8 : jmp *0x8049670 (gdb) si 0x080482de in printf@plt () 0x080482de : push $0x10 I think maybe is can be default option of gdb. Add it to display with itse= lf? 2. Output assembly codes number limit. This idea form Doug: 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). I think maybe it need output something like "This message is cut ... you can set it with ...". 3. Special for optimized code. This idea form Doug too: 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. I think maybe is too much thing for disassemble. Thanks, Hui On Thu, Mar 5, 2009 at 07:40, Tom Tromey wrote: >>>>>> "Daniel" =3D=3D Daniel Jacobowitz writes: > >>> Right, I thought about something that begins with "disassemble", but >>> didn't want to shoot our completion habits in the foot, since >>> currently typing just "disas TAB" is all I need to get disassembly. > > Daniel> I agree we don't want to change that binding (I use it all the ti= me). > Daniel> But is it a problem? =A0This would be under set, if I understand = right. > > Yeah, this sounds reasonable to me. > I'd prefer to have some word like "disassemble" in the parameter name. > > Tom >