From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18837 invoked by alias); 19 Jan 2017 15:24:28 -0000 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 Received: (qmail 18820 invoked by uid 89); 19 Jan 2017 15:24:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 spammy=Marc, differs, 58pm, 58PM X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 15:24:17 +0000 Received: from ESESSHC016.ericsson.se (Unknown_Domain [153.88.183.66]) by (Symantec Mail Security) with SMTP id BC.D7.15498.C1AD0885; Thu, 19 Jan 2017 16:24:13 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.66) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Jan 2017 16:25:04 +0100 Received: from DB4PR07MB0656.eurprd07.prod.outlook.com (10.141.44.148) by DB4PR07MB0653.eurprd07.prod.outlook.com (10.141.44.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.6; Thu, 19 Jan 2017 15:24:10 +0000 Received: from DB4PR07MB0656.eurprd07.prod.outlook.com ([10.141.44.148]) by DB4PR07MB0656.eurprd07.prod.outlook.com ([10.141.44.148]) with mapi id 15.01.0860.012; Thu, 19 Jan 2017 15:24:10 +0000 From: Marc Khouzam To: Bob Rossi CC: "gdb@sourceware.org" Subject: Re: GDB/MI questions Date: Thu, 19 Jan 2017 15:24:00 -0000 Message-ID: References: <20170119031445.GA24616@xubuntu.brasko.net> ,<20170119151120.GB6289@xubuntu.brasko.net> In-Reply-To: <20170119151120.GB6289@xubuntu.brasko.net> authentication-results: spf=none (sender IP is ) smtp.mailfrom=marc.khouzam@ericsson.com; x-ms-office365-filtering-correlation-id: fa229233-a86a-4a89-b9e9-08d4407f37c9 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB4PR07MB0653; x-microsoft-exchange-diagnostics: 1;DB4PR07MB0653;7:+sAK3738KG7UoG9892ic0RD0FrojANz2dh+q1Wn4/Xeq24R6v1qDtUdjnz7jU45SAeDZXprYiCHZGPfLTQ1wUzb+rAjsVAU2nFLicDEPde/RKiD0xj6ljkZ7+vfhEWB+FmcQDOR7GuO4Tjv06jYtSW0Ut0JME1z1X8UpoYWl9MGZ7eKiWRCf6lw+lUebspMk61pvFQHUWjjGmPKWnQCp5ht0V6eSyHeqmpqLhDR8M1aZq+fwHeRnGyqy0K7jljQ2KYP+MGc/OGXkqE5b40uzk9dTeggQceAkZtRJCce54FnAOiRlJ90W8tsFTfMfHzPEtIxiHzcQDaDDW2K/EnV+SAvzwvAsMzgtRMfsroye7rqjR3p36JBL1x61T8LRzQeSSPVSoSDzWcCSdFGN4rsVFUYFq3rnICzViQBnjLb02wrAClumg8fPq9uhuF+UmBllNvPGQvAASfV1DDxcxMFKXg== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(35073007944872); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148);SRVR:DB4PR07MB0653;BCL:0;PCL:0;RULEID:;SRVR:DB4PR07MB0653; x-forefront-prvs: 0192E812EC x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(199003)(189002)(24454002)(69234005)(76176999)(50986999)(54356999)(66066001)(81156014)(8936002)(8676002)(81166006)(305945005)(33656002)(101416001)(3480700004)(106116001)(9686003)(74316002)(2950100002)(5660300001)(7736002)(7696004)(110136003)(6916009)(106356001)(122556002)(105586002)(68736007)(97736004)(4326007)(3280700002)(6436002)(6506006)(92566002)(55016002)(2906002)(53936002)(3846002)(6116002)(102836003)(229853002)(189998001)(25786008)(38730400001)(99286003)(2900100001)(77096006)(86362001)(3660700001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR07MB0653;H:DB4PR07MB0656.eurprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2017 15:24:10.5042 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR07MB0653 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00034.txt.bz2 > On Thu, Jan 19, 2017 at 02:30:58PM +0000, Marc Khouzam wrote: > > > Second, from the CLI if you run the command "next", then if you hit > > > the enter key, GDB will run the "next" command again. > > > However, in GDB/MI if you run -interpreter-exec console "next", and t= hen > > > follow that with the Enter key, GDB does nothing. > > > Is there a way to run the last command? >=20 > ... >=20 > > But if you really want that for some reason, you can just keep track > > of the last command you sent in MI, and then when getting an lone > > Enter, you could send it again. But then you don't have the smarts > > of GDB to know which commands should repeat and which should not. > > I don't think this is a very good idea. >=20 > I'm just trying to provide the same functionality I did when I was using > annotations. This was one of the noted differences. >=20 > Since the MI differs in this area, I've done as you suggested and > that works well. I guess I'll see if there are any downsides here. For the record, I'll add my voice to Pedro's suggestion to try out the 'new-ui' command and have a separate MI channel from your CLI. That is such a better user experience. And it shouldn't be very hard to implement in your frontend since you were previously handling a GDB CLI anyway. FYI, Eclipse launches GDB in CLI mode (probably like you did before) and let's the user interact with that CLI, while it sends MI commands on the dedicated PTY for the MI channel. Here is the parameters eclipse uses to launch such a GDB: gdb.7.12 --nx -q -ex "new-ui mi " -ex "set pagination off" -ex sh= ow version Note that the "-q" command along with the last two -ex commands are to make= =20 sure GDB does not paginate before creating the MI channel, in case the term= inal is=20 too small to even show the version. One very important note if you use the new-ui feature, is that you need to = run mi-async because the MI channel does not accept ^C, so you need to use -exec-interrupt instead.=20=20 Also, it will probably need a bit more work if you target Windows. Marc