From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10408 invoked by alias); 21 Aug 2007 13:28:02 -0000 Received: (qmail 10263 invoked by uid 22791); 21 Aug 2007 13:28:01 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Aug 2007 13:27:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 37B41980C1; Tue, 21 Aug 2007 13:27:56 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id DF1E7980C0; Tue, 21 Aug 2007 13:27:55 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1INTlx-0006kz-4a; Tue, 21 Aug 2007 09:27:53 -0400 Date: Tue, 21 Aug 2007 13:28:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Maxim Grigoriev , gdb-patches@sources.redhat.com, Pete MacLiesh , Marc Gauthier , Ross Morley Subject: Re: [PATCH] MI and MI2 should have identical behavior on -target-download command Message-ID: <20070821132753.GA25612@caradoc.them.org> Mail-Followup-To: Nick Roberts , Maxim Grigoriev , gdb-patches@sources.redhat.com, Pete MacLiesh , Marc Gauthier , Ross Morley References: <46CA01BF.3000501@hq.tensilica.com> <18122.55169.70021.143467@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18122.55169.70021.143467@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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: 2007-08/txt/msg00412.txt.bz2 On Wed, Aug 22, 2007 at 12:16:01AM +1200, Nick Roberts wrote: > > It fixes a small glitch in GDB MI. MI2 is a default. So > > MI and MI2 should work identically. The MI2 being set as > > a default is hard-coded in several places. I think one > > place was missed: > > > > mi/mi-main.c::mi_load_progress(). Sorry, we (specifically Andrew Stubbs) noticed this problem in November 2005, but no one got around to fixing it. > > Without this fix, MI "-target-download" command behaves > > differently on MI versus MI2 not showing loading progress, > > when "-i=mi2" is used. > > > > GDB front-ends developers might want to stick with "-i=mi" > > assuming they always use a default. It would be a bad idea > > to force them to use explicit options like "-i=mi2". > > What behaviour do you want for mi3? MI3 should probably print the progress indicator too. Like below. Anyone disagree with this patch? -- Daniel Jacobowitz CodeSourcery 2007-08-21 Maxim Grigoriev Daniel Jacobowitz * mi-main.c (mi_load_progress): Handle MI2 and MI3 interpreters. Index: mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.101 diff -u -p -r1.101 mi-main.c --- mi-main.c 10 Aug 2007 21:52:38 -0000 1.101 +++ mi-main.c 21 Aug 2007 13:26:30 -0000 @@ -1465,10 +1465,13 @@ mi_load_progress (const char *section_na of this function. */ saved_uiout = uiout; - if (current_interp_named_p (INTERP_MI)) + if (current_interp_named_p (INTERP_MI) + || current_interp_named_p (INTERP_MI2)) uiout = mi_out_new (2); else if (current_interp_named_p (INTERP_MI1)) uiout = mi_out_new (1); + else if (current_interp_named_p (INTERP_MI3)) + uiout = mi_out_new (3); else return;