From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Gdb in emacs 24 Date: Wed, 19 Oct 2011 07:38:42 -0600 Message-ID: References: <87k481gma9.fsf@ginnungagap.bsc.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1319031542 31564 80.91.229.12 (19 Oct 2011 13:39:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2011 13:39:02 +0000 (UTC) Cc: David Reitter , Stefan Monnier , "emacs-devel@gnu.org devel" To: =?utf-8?Q?Llu=C3=ADs?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 15:38:57 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGWMD-00044T-9F for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 15:38:57 +0200 Original-Received: from localhost ([::1]:50874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWMC-0005mg-CB for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 09:38:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWM9-0005mN-6P for emacs-devel@gnu.org; Wed, 19 Oct 2011 09:38:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGWM7-0002z7-0C for emacs-devel@gnu.org; Wed, 19 Oct 2011 09:38:52 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:7814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWM6-0002xd-Hk for emacs-devel@gnu.org; Wed, 19 Oct 2011 09:38:50 -0400 Original-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9JDcjka008352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Oct 2011 09:38:45 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9JDcihK014498; Wed, 19 Oct 2011 09:38:45 -0400 Original-Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9JDchYm011531; Wed, 19 Oct 2011 09:38:43 -0400 X-Attribution: Tom In-Reply-To: <87k481gma9.fsf@ginnungagap.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs?= =?utf-8?Q?=22's?= message of "Wed, 19 Oct 2011 15:10:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145328 Archived-At: >>>>> "Llu=C3=ADs" =3D=3D Llu=C3=ADs writes: Llu=C3=ADs> * interpreter-exec mi Llu=C3=ADs> Execute each command under the MI interpreter, even if the us= er Llu=C3=ADs> did not actually set it up in the cmdline. Llu=C3=ADs> Even if not optimal, the cost of setting the interpreter on a Llu=C3=ADs> per-command basis (as opposed to setting the current Llu=C3=ADs> interpreter for all future commands) should not have a Llu=C3=ADs> noticeable impact on performance. I think the drawback is that you don't get MI notifications for commands entered by the user. What I mean by notifications is, e.g., if the user types "break main", the current gdb will inform the MI consumer: &"break main\n" ~"Breakpoint 1 at 0x485fb3: file ../../archer/gdb/gdb.c, line 30.\n" =3Dbreakpoint-created,bkpt=3D{number=3D"1",type=3D"breakpoint",disp=3D"= keep",enabled=3D"y",addr=3D"0x0000000000485fb3",func=3D"main",file=3D"../..= /archer/gdb/gdb.c",fullname=3D"/home/tromey/gnu/archer/archer/gdb/gdb.c",li= ne=3D"30",times=3D"0",original-location=3D"main"} ^done Llu=C3=ADs> * What to do if the user ever passed "-i=3Dtui" in the gdb cmdl= ine Llu=C3=ADs> (which seems to make MI unusable even through Llu=C3=ADs> "interpreter-exec"). Yeah, that will just fail. There's no reason to use the TUI and Emacs at the same time, it doesn't make sense. Maybe we could disable the TUI if $EMACS is set. Llu=C3=ADs> * Should user-issued commands in the gdb buffer use the mi or c= onsole Llu=C3=ADs> interpreter? Llu=C3=ADs> If it were mi, no problems, apply same approach as above. If = it Llu=C3=ADs> were the console interpeter (append "-i=3Dconsole" when start= ing Llu=C3=ADs> gdb; see above), there would still be a need for the Llu=C3=ADs> "interpreter-exec" command. I think you'd have to use interpreter-exec to get the notification behavior. So, maybe this can all be done with no changes on the gdb side. Worth a try. Tom