This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] python: Use console format for output of gdb.execute command


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]