This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR mi/2077 "set edit off" breaks MI
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nick Roberts <nickrob at snap dot net dot nz>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 17 Nov 2006 16:34:49 -0500
- Subject: Re: [PATCH] PR mi/2077 "set edit off" breaks MI
- References: <17719.15772.325330.48627@kahikatea.snap.net.nz>
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 <www.apple.com>
>
> 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