From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10251 invoked by alias); 19 Oct 2009 19:40:42 -0000 Received: (qmail 10240 invoked by uid 22791); 19 Oct 2009 19:40:42 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 19:40:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8F32E2BACA1; Mon, 19 Oct 2009 15:40:33 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LLhe9m9azwbY; Mon, 19 Oct 2009 15:40:33 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 229082BACA2; Mon, 19 Oct 2009 15:40:33 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id EC6F1F5921; Mon, 19 Oct 2009 21:40:30 +0200 (CEST) Date: Mon, 19 Oct 2009 19:40:00 -0000 From: Joel Brobecker To: Paul Pluzhnikov , tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [RFC][patch] Allow to disassemble line. Message-ID: <20091019194030.GB5282@adacore.com> References: <20091002004954.8966C76B2B@ppluzhnikov.mtv.corp.google.com> <8ac60eac0910080916i5a2eb49an5f21f3b5c7fb96ef@mail.gmail.com> <20091008162350.GA8625@caradoc.them.org> <8ac60eac0910080952p46f15693x6ed339473db0139d@mail.gmail.com> <8ac60eac0910161607k55fee22cs379c5b7635d7b6a@mail.gmail.com> <8ac60eac0910191109v62794c33g6712090912b5c11f@mail.gmail.com> <20091019184853.GA18564@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091019184853.GA18564@caradoc.them.org> User-Agent: Mutt/1.5.18 (2008-05-17) 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 X-SW-Source: 2009-10/txt/msg00443.txt.bz2 > For whatever it's worth, I miss the extra screen real estate stolen by > the enlarged prompt (or even the narrower prompt). I use a wider than > average terminal and most of the times I use disassemble it still runs > off the right and wraps unreadably. It's fine in examples because > they have names like "gdb_main" or "bar"... Same complaint here... > We've got this layout here with nicely aligned columns but tons of > whitespace. In a halfway modern world we could do this with color. > Or bold the address of the current instruction. This would be a real > interface departure for GDB so I'm curious what others think of it. > (Yes, I'm thinking of Tufte, why do you ask?) Wouldn't it be a problem with targets using MI? Or IDEs that run GDB through a pipe (thinking of Windows in this case)? I love the idea of starting to take advantage of the terminal capabilities in order to introduce font properties such as colors or boldness. > (top) disas > Dump of assembler code for function gdb_main: > 0x0000000000454c9e (+0): push %rbp > 0x0000000000454c9f (+1): mov %rsp,%rbp Regardless of the above, this suggestion seems fine to me. The repeated function name has always been clutter (more of the time, I disass the current function, and I know what it is :-). > (gdb) x/2i main > Dump of assembler code for function main: > 0x44cce0 (+0): sub $0x28,%rsp > 0x44cce4 (+4): movq $0x0,(%rsp) This one is a little less obviously nice. I have little user-define functions such as "ssi" which does "stepi; x /i $pc". Having the output fit in a couple of lines would really add clutter in this case (IMO). > I do observe that disassemble prints leading zeros and examine strips them. We could start with that... -- Joel