This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] python: Use console format for output of gdb.execute command
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Catalin Udma <catalin dot udma at freescale dot com>, gdb-patches at sourceware dot org
- Date: Wed, 2 Mar 2016 22:20:33 +0000
- Subject: Re: [PATCH] python: Use console format for output of gdb.execute command
- Authentication-results: sourceware.org; auth=none
- References: <1456756452-15880-1-git-send-email-catalin dot udma at freescale dot com>
On 29/02/16 14:34, Catalin Udma wrote:
> When gdb is started in MI mode, the output of gdb.execute
> command is in MI-format in case when it is executed from python stop
> handler while for all other cases the output is in console-format.
>
> To assure consistent output format, this is fixed by using the console
> format for all python gdb command executions.
>
> PR python/19743
While I have no problems with the patch, is the expectation that if
the interpreter is in MI mode and a command has previously output that
structured output, isn't the inverse the bug? Shouldn't gdb.execute
honor the interpreter instead of forcing one? I'm not too sure on
this, not being an MI expert, or whether some commands in GDB
arbitrarily output one or the other. I'll dig around when I find some
time and see if I can find anything definitive.
The other thought of course is, if this is right, it arguably
introduces an API regression. So we might have to work with some
compatibility mode for existing scripts.
A tricky bug!
Cheers
Phil