From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Llu=C3=ADs?= Newsgroups: gmane.emacs.devel Subject: Re: Gdb in emacs 24 Date: Wed, 19 Oct 2011 20:55:39 +0200 Message-ID: <87lisgizf8.fsf@ginnungagap.bsc.es> References: <87k481gma9.fsf@ginnungagap.bsc.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1319050563 18508 80.91.229.12 (19 Oct 2011 18:56:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2011 18:56:03 +0000 (UTC) Cc: Tom Tromey , David Reitter , "emacs-devel@gnu.org devel" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 20:55:58 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 1RGbIs-0006YT-QX for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 20:55:50 +0200 Original-Received: from localhost ([::1]:47404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGbIr-0001Ky-QD for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 14:55:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGbIp-0001Ki-FX for emacs-devel@gnu.org; Wed, 19 Oct 2011 14:55:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGbIn-0003Ny-IG for emacs-devel@gnu.org; Wed, 19 Oct 2011 14:55:47 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:48318) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RGbIn-0003No-4N for emacs-devel@gnu.org; Wed, 19 Oct 2011 14:55:45 -0400 Original-Received: (qmail invoked by alias); 19 Oct 2011 18:55:42 -0000 Original-Received: from unknown (EHLO localhost) [84.88.53.92] by mail.gmx.net (mp072) with SMTP; 19 Oct 2011 20:55:42 +0200 X-Authenticated: #12333383 X-Provags-ID: V01U2FsdGVkX19nIndDZZFnViaQaLhjjrX6I3upGd2sLFAwz/TgTg rb/7ZB1EVG0hfc In-Reply-To: (Stefan Monnier's message of "Wed, 19 Oct 2011 13:54:56 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 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:145349 Archived-At: Stefan Monnier writes: Stefan> How 'bout some way to just check whether `mi' is the Stefan> current interpreter. It doesn't have to be a dedicated command, just Stefan> a command which will reliably behave differently (e.g. return some Stefan> recognizable value if `mi' is used, and return an error if not). >> Pretty much any MI command will do that, e.g., "-list-features". > Then could someone patch gdb-mi.el to use this as a test and send > a clear error message to the user about the need for "-i=mi"? > I think it's too late to use "interpreter exec" for 24.1, but such > a test would at least address some of the bug reports I've seen where > users had used "--annotate=3". As I said, if the use of annotate is the only problem, it can be disabled with a simple gdb command just after gdb-mi.el starts gdb: set annotate 0 This trivial change should address all the bugs you referred to. The use of "interpreter-exec" is just to make sure commands go through MI even if the user omits the "-i=mi" argument. Then the check you say is just to cover the case of the user starting gdb with "-i=tui", which will probably never happen. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth