From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128449 invoked by alias); 9 Aug 2016 22:10:39 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 128417 invoked by uid 89); 9 Aug 2016 22:10:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=disabling, combinations, thorough, Merge X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 09 Aug 2016 22:10:28 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix PR mi/20431 - Missing MI prompts after sync execution MI command (-exec-continue, etc.) errors From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: <80614914274f7166baea2ec656aec6a949869324@gdb-build> Date: Wed, 10 Aug 2016 00:26:00 -0000 X-SW-Source: 2016-q3/txt/msg02133.txt.bz2 *** TEST RESULTS FOR COMMIT 80614914274f7166baea2ec656aec6a949869324 *** Author: Pedro Alves Branch: master Commit: 80614914274f7166baea2ec656aec6a949869324 Fix PR mi/20431 - Missing MI prompts after sync execution MI command (-exec-continue, etc.) errors gdb 7.11 introduced an MI regression: a failing MI sync execution command misses printing the MI prompt, and then all subsequent command miss it too: $ gdb-7.11.1 -i=mi [...] p 1 &"p 1\n" ~"$1 = 1" ~"\n" ^done (gdb) <<< prompted ok -exec-continue ^error,msg="The program is not being run." <<< missing prompt after this print 1 &"print 1\n" ~"$2 = 1" ~"\n" ^done <<< missing prompt after this gdb 7.10.1 behaved correctly, even with "set mi-async on": -exec-continue ^error,msg="The program is not being run." (gdb) <<< prompted ok etc. Bisecting points at: commit 0b333c5e7d6c Author: Pedro Alves Date: Wed Sep 9 18:23:23 2015 +0100 Merge async and sync code paths some more [...] The problem is that when an exception is thrown, we leave the prompt state set to PROMPT_BLOCKED, and then mi_execute_command_input_handler doesn't print the prompt. It used to work because before that patch, we happened to skip disabling stdin if the current target didn't do async (which it never does before execution). I was surprised to find that this bug isn't caught by the testsuite, so I made a thorough test that tests all combinations of pairs of: - a failing synchronous execution command - a failing non-execution command - a non-failing command gdb/ChangeLog: 2016-08-09 Pedro Alves PR mi/20431 * mi/mi-main.c (mi_execute_command): Enable input and set prompt state to PROMPT_NEEDED. gdb/testsuite/ChangeLog: 2016-08-09 Pedro Alves PR mi/20431 * gdb.mi/mi-cmd-error.exp: New file.