This is the mail archive of the
mailing list for the GDB project.
Re: [patch, rfa] tweak to defaulted_query logic to fix gdb.mi test errors
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Date: Tue, 18 Oct 2016 11:08:56 -0500
- Subject: Re: [patch, rfa] tweak to defaulted_query logic to fix gdb.mi test errors
- Authentication-results: sourceware.org; auth=none
- References: <57CF117B.email@example.com>
- Reply-to: Luis Machado <lgustavo at codesourcery dot com>
On 09/06/2016 01:56 PM, Sandra Loosemore wrote:
This patch moves the check for deprecated_query_hook before
input-not-from-terminal check in defaulted_query, instead of after it.
Presently, the only thing that uses deprecated_query_hook is the MI
backend, which uses it to suppress the question entirely, so that the
current behavior leads to the situation where nothing is printed when
the input is a terminal but there is a message otherwise, which is
The specific problem this patch solves is a testing issue with
gdbserver. mi_gdb_target_load says:
mi_gdb_test "kill" ".*" ""
and if the test harness is not running GDB from a terminal we get:
~"Kill the program being debugged? (y or n) [answered Y; input not from
ERROR: Got interactive prompt.
because it is tripping over the "\\(y or n\\) " pattern in mi_gdb_test.
Of course mi_gdb_test could be fixed to recognize the "input not from
terminal" message as valid, but I don't think that's the intended MI
behavior. I think this is a bug in GDB, not the testsuite.
OK to commit?
This looks simple and reasonable enough for me. What do