From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Gulick Newsgroups: gmane.emacs.bugs Subject: bug#29020: [PATCH] gdb-mi doesn't display prompt when attaching Date: Mon, 30 Oct 2017 10:23:49 -0400 Message-ID: <0913392f-4427-5877-69fc-e12d6bc73c11@mathworks.com> References: <385b433a-8b6d-7591-c19c-6064ef83d9f4@mathworks.com> <83zi8c5wa8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1509373523 32666 195.159.176.226 (30 Oct 2017 14:25:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2017 14:25:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 Cc: 29020@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 30 15:25:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9B02-0007Mo-9N for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 15:25:10 +0100 Original-Received: from localhost ([::1]:40899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9B09-0003l3-NS for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 10:25:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Azx-0003fv-G3 for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 10:25:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9Azu-0007bV-77 for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 10:25:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9Azu-0007b8-3A for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 10:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e9Azt-0000qX-O0 for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 10:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mike Gulick Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Oct 2017 14:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29020 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29020-submit@debbugs.gnu.org id=B29020.15093734453176 (code B ref 29020); Mon, 30 Oct 2017 14:25:01 +0000 Original-Received: (at 29020) by debbugs.gnu.org; 30 Oct 2017 14:24:05 +0000 Original-Received: from localhost ([127.0.0.1]:42292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Ayz-0000p9-Jr for submit@debbugs.gnu.org; Mon, 30 Oct 2017 10:24:05 -0400 Original-Received: from mail-co1nam03on0045.outbound.protection.outlook.com ([104.47.40.45]:6886 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Ayx-0000oe-KG for 29020@debbugs.gnu.org; Mon, 30 Oct 2017 10:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathworks.onmicrosoft.com; s=selector1-mathworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LEOylcMH3rC3w+KU93gxvRvasXnpJObcJWyugPpQsSU=; b=q/876Lf8r1kAVoN+rwJHYdQI5+3T/CTY1Gt5nv4ABq+hFblFCbl0vMCoWxnCNcqXemQv2CbqJILULlBQ+m2Witn3cQOMrqiqIVkhskb3UZ1bfg1kUfbTjUnwTfsR4oYAqradnwS35tp2iA8dBdNpZwRdPvl6WT++yKaAR2IRy2o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Mike.Gulick@mathworks.com; Original-Received: from [172.28.194.135] (144.212.3.4) by SN1PR0501MB2048.namprd05.prod.outlook.com (10.163.227.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.4; Mon, 30 Oct 2017 14:23:55 +0000 In-Reply-To: <83zi8c5wa8.fsf@gnu.org> Content-Language: en-US X-Originating-IP: [144.212.3.4] X-ClientProxiedBy: BN6PR13CA0028.namprd13.prod.outlook.com (10.171.172.14) To SN1PR0501MB2048.namprd05.prod.outlook.com (10.163.227.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44c3b4a0-1c38-4350-07b2-08d51fa1dac4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:SN1PR0501MB2048; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2048; 3:4UcBYLU10/79gCDpGiwyGMoFAAo/lT6rX1BNu6pNBJVuL2FSxxknQcpUcfm6+t1W09q+jCSebKHXpo0+Gi7frUXsFKAt0q4EqVoD8vlKJoFRq1KtARUOKBAClVaMKjsS9fU4uMH2pf6JYI+WcQwxnQ1Mc+ioXDJwP86bBXA7BLWSgHoAqFqwQz1Bn5MlGZMv55eUIFnVKY6QMW4j8oFlU87cP7+P0I/G0cpnGiF+5HuYOMLUeSXlheHXsQ0V3kCr; 25:D/EprE1dDno3+IYWHfoJpY377s8qmqaOh+LRNM9s8uMGg7kh7EoOtBrt7cEs/9NoWeJi0IbFlr2cf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RF8bBxNNeG07p; 4:W1GD+oIbr3Rz6kwPz+3P2xcd3Qfwo7ApFxB5FSGq+G9DC5UFXilxzrTbBxzuiXex4rY6sCil0p0DaN617dV8MQvWDYRJS0bNai/DfyiVw4XqtHdjcVEf4ZOPw15FTnoG9hTYKbqlx1FXqw0EXQpPyjw4FV8dIs4sInuoLnB5MCpdyhanjunhcsYw0GjzBUrro3K07sszz28jsfq7OcVBMOi1xtZHEs8X6zbd0SOAxrlmU6S6dENwcLAfQdlxo9ztXTm6jE/ZNG+fP9pq7jpVCLTyV5/4enP7Hn7aKqMAb6l+zyMt6RSrjFQAcRYpXN76 X-Exchange-Antispam-Report-Test: UriScan:(190756311086443); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3231020)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0501MB2048; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0501MB2048; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6049001)(376002)(346002)(39860400002)(24454002)(199003)(189002)(68736007)(72206003)(478600001)(81166006)(81156014)(31686004)(8676002)(47776003)(8936002)(7736002)(305945005)(16576012)(76176999)(65806001)(65956001)(66066001)(50986999)(316002)(54356999)(93886005)(58126008)(53546010)(23676002)(36756003)(101416001)(5890100001)(97736004)(4326008)(5660300001)(65826007)(230700001)(3846002)(6116002)(6666003)(2950100002)(6916009)(53936002)(83506002)(6246003)(64126003)(2906002)(16526018)(189998001)(50466002)(86362001)(25786009)(33646002)(105586002)(106356001)(90366009)(77096006)(6486002)(31696002)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0501MB2048; H:[172.28.194.135]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mathworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2048; 23:w4fcDJ9lcVDLsEjWGmmI9XEPHr3pyxuXf9L2lcLNUdHxpIjfsbCpzE+Yb6kL9eR0Q3Dtl5wWA5Fy88XcY1cDZ78k+KNvRI/+/ji+JHnJbEcbeQ4MzlGrG3GT8BguBd18x0rHFLWHEBEOelNx3tM06B/fFjonsfe5QnHURVC28MWJX6kiPcQHZE7vIK6gDe4tRTaM4JPWZ4/cx0VBGd/cKOViTj2c4NUhf0l1adaiJvGhdZM83a6L8kp3P2wAvEcWhL0TDSiguAontojmsT8ERP72rKW7YmhViB2Dh+urkzaGT9dgGTkzuQJTKlBZQ3F8pxIa+96lY0KxGWQtRtjl8ubUZBvVhu5EPInAbV8MoTsmLgvHHqAEuh1OolHWZgEed+/tvGbq4VfJEz0rEjOc0RpVAWsOI/UdqbYreCa3ndnXeSzw2ckUglcbzoRkcnvY40tIGeFBrLiaPNhv3E4n0Mccz5D11R9sC1Fp62himtx7jY/GPa4olCx5ywEkJk+yazUDwfFuy0xFismi6hxspLNIVYjM9Qt9y5PCMTbnT/KzegxTr3T+ypb3gNj7OrwzTVSVQsmphgkbjyys+F+TvCcMEF6TuYZ0ma/MSrbr1bQehpOprHi4m6SJdkZTr5Fm2IE+wWLPHCAtcyIP70kFNDWcS3wxFcXvbWz2arrRFtecRIP4FQ7U0grTB523n6krSA24PhTSc9UOEkJcG/29mZj46iCrO7I77mCn1T2VTH2tvNfTcF2xOFuDhQbIQsac9Un0QqXDoWHE58MncwK+w89ane2O NsCtZyWOvLbk9v5HLB3UBV2aroFw7+4VVAl3NEWJkc1m X-Microsoft-Exchange-Diagnostics: 1; SN1PR0501MB2048; 6:ZWw1nGs32J08CbQvP3ocL7IL3FPGPNbrB6Xc16ng/YsybeHSZdJX011XaGfi0nRgC4YhLUlPRGRR+LodYDSxyk3ZgKt2LRKl5t8B+dU+MgxS43//c21p/rIRlSUm/fiu7VhOO/l6OXd3vvoO10sRouVB7h5V3glVZyc2z84CQmbmO2YjVCEcQfcbWc9gpNa2/5Ke3JooCno5RrL4jWB955oqwTYVkqG8M3wNBxEYVHdWQCxpqteRVW+7EIZ62qqJ3BSiyN4SrrviLsjRDqBmFkdWArcT95x0GYWeAqt/oXdqigNsfGt8VZgaBID0FlbaB3pFkrtphzQDrZ20/1cwfCYj9pLJv2AyF9BYHqxMHXI=; 5:9hwMU7/OuxuhibKj0s6MyowX49gBPzjBbrVtJJlxovt5iYrpBqEebkHALNuGuzFlclbjauh5WS8hAhHHnaH6ZTUrYIyCOp0dLG9jB2++IZL/LOEC1NtLt3y4AP9l8FVfeH+ATI81/ywAoTptGm7gi71RABq1Sf4aL4RdzIoVeJQ=; 24:ZQxQ6FEYkIzVoL8eqviRatdbXBYeqKa9fbr7ArpAL25R6XlC4Awyqgsxr9gxoxGrWbJXQVNPaOpY6QpbYi2vUac2oU0uxx9IMGpCBf+cVuo=; 7:9X/w/mZx5ksyUnvC8/TdRFOufofh6c/aR6gThY7HWoqAADo56NeTtk1DC7+BhzGSF3G19BxFBzujhOSYOUj7HqTsvAPZZhOIpdy113CPai6sNfJdghPTV4OVJg7VUTO6+l/dWSB0U1sFGtFbK4M/aksNOHCTY4hFpS4gK/xk5d6VsQz8PkAKGXc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: mathworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 14:23:55.7487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44c3b4a0-1c38-4350-07b2-08d51fa1dac4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 99dd3a11-4348-4468-9bdd-e5072b1dc1e6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0501MB2048 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139180 Archived-At: On 10/27/2017 01:35 PM, Eli Zaretskii wrote: >> From: Mike Gulick >> Date: Fri, 27 Oct 2017 11:28:00 -0400 >> >> This patch is pretty straightforward. When we write a console message >> to the GUD buffer, we now reset a variable that is used to determine >> whether to print the gdb prompt on the next '^done' or '*stopped' >> message. > > Thanks, but could you please also provide a recipe that would > demonstrate the effect of this change? > Hi Eli, Is the example I provided in the bug report sufficient? E.g. 1) In shell: $ sleep 1000 & [1] 9924 # <--- NOTE PID 2) In shell: $ emacs -Q 3) In emacs M-x gdb Run gdb (like this): gdb -i=mi -n 4) In *gud* buffer (gdb) attach 9924 # <--- PID from earlier 5) Observe that (gdb) prompt is not displayed after output from GDB With the patch, the (gdb) prompt will be displayed, e.g. (gdb) attach 9924 Attaching to process 9924 (gdb) Reading symbols from /bin/sleep...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug/.build-id/79/450f6e36287865d093ea209b85a222209925ff.debug...done. done. Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/.build-id/6f/150f33b150d6a81e26a425dd47d713d00f2d29.debug...done. done. 0x00007f8f29196230 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84 84 ../sysdeps/unix/syscall-template.S: No such file or directory. (gdb) Thanks, Mike