From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23809 invoked by alias); 17 Nov 2006 21:35:03 -0000 Received: (qmail 23800 invoked by uid 22791); 17 Nov 2006 21:35:02 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 17 Nov 2006 21:34:51 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GlBMH-00048M-4l; Fri, 17 Nov 2006 16:34:49 -0500 Date: Fri, 17 Nov 2006 21:35:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] PR mi/2077 "set edit off" breaks MI Message-ID: <20061117213449.GC13961@nevyn.them.org> Mail-Followup-To: Nick Roberts , gdb-patches@sources.redhat.com References: <17719.15772.325330.48627@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17719.15772.325330.48627@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00187.txt.bz2 On Thu, Oct 19, 2006 at 09:55:56PM +1300, Nick Roberts wrote: > > This patch is taken out of the async patch. It's probably a good idea to > commit the different parts separately anyway. Definitely. > Apple switch interpreters which fixes this bug. Jim Ingham can probably > explain more eloquently why it works. FYI, the reason I shelved this one to reply to later was that you didn't explain how it works. It's much harder to review a patch for correctness in that case. I have to go figure it out myself whether it's fixing the symptom or the cause. When I went to do that I decided that the patch only fixed the symptom, unfortunately. Try repeating your test case, but instead of saying "set edit off", say "-gdb-set edit off". That won't switch interpreters because it isn't running a CLI command. Then try -exec-next and it will fail. The problem occurs because it's futzing with the CLI input handlers when they are not installed, particularly input_handler. I don't really understand how all the event loop bits work. The right solution to this may be to not change anything if the current interpreter isn't the CLI, but I don't know what should happen if TUI is enabled. Or maybe the right solution is to not change input_handler in change_line_handler, just the other two. The comment says to do that in case "set edit off" is in .gdbinit, but I don't see why that matters; do you? The patch itself is probably good, by the way, just not for this bug. I would definitely like to merge the async changes in pieces, so if you can explain why this patch is necessary and write a changelog for it, I'll take a second look at it on its own merits. > I don't know how to give attribution to these changes in the ChangeLog as I > can't match them to entries in Apple's. Perhaps Jim can provide the details. > Otherwise can I just write?: > > 2006-10-19 Apple Computer, Inc > > Or do I need a person/e-mail address? I think it would be best to put your own name on the changelog, and mention something like "From Apple Computer, Inc." at the top of the entry. I don't really know though so if anyone else has an opinion, please share. -- Daniel Jacobowitz CodeSourcery