From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73522 invoked by alias); 10 Aug 2018 10:28:29 -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 73504 invoked by uid 89); 10 Aug 2018 10:28:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1979, patched X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 10:28:25 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [147.32.232.238]) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id w7AASFSA033527 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 10 Aug 2018 12:28:17 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Received: from sao (5ac693bc.bb.sky.com [90.198.147.188] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id w7AASF1l046963 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 10 Aug 2018 12:28:15 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: Subject: Re: [RFC] mi: add -a option to the "-data-disassemble" command From: Jan Vrany To: Pedro Alves , gdb-patches@sourceware.org Date: Fri, 10 Aug 2018 10:28:00 -0000 In-Reply-To: <57cf8fb8-fcd5-048f-d757-3ce20bddad11@redhat.com> References: <877ekz6ze7.fsf@tromey.com> <20180810082953.8426-1-jan.vrany@fit.cvut.cz> <57cf8fb8-fcd5-048f-d757-3ce20bddad11@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg00266.txt.bz2 On Fri, 2018-08-10 at 10:47 +0100, Pedro Alves wrote: > On 08/10/2018 09:29 AM, Jan Vrany wrote: > > @@ -33095,6 +33101,9 @@ records, produced when trying to execute an undefined @sc{gdb/mi} command > > @item exec-run-start-option > > Indicates that the @code{-exec-run} command supports the @option{--start} > > option (@pxref{GDB/MI Program Execution}). > > +@item data-disassemble-a-option > > +Indicates that the @code{-data-disassemble} command supports the @option{-a} > > +option (@pxref{GDB/MI Data Manipulation}). > > @end ftable > > I'm curious about how you intend to use this new -list-features feature. > Are you enabling/disabling some UI element depending on presence of the > feature? I.e., something that you wouldn't be able to do by just > trying the "-data-disassemble -a" command and looking for error? Yes. Basically I have a menu item on frame that opens another window with disassembly of the coresponding function (showing current instruction, (basic) blocks and alike). For programs with debug information, I can do that even without -a option. For programs without debug information, I need -a option and - to make the frontend robust w.r.t UX - I disable the menu item. I can indeed just try and catch the error, but this seems to be too heavyweight. It would mean to disassemble function whenever user switches frames in the UI or in CLI. I can cache the result, but still. This new feature just makes it trivial and fast enough (no MI roundtrip to enable/disable menu item) That being said, I do not insist on having this feature. I'm close to the point of just saying "you need to use my patched GDB, anyway. At least for "now" and hope that my patches will eventually make it into official GDB release. Not a big deal for me, not at all. So, if you (meaning you maintainers) prefer not having this feature, I'll just remove it. Absolutely no problem! Just let me know. Jan