From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12163: 24.1; Can not input anything or showing none output when debugging c/c++ application. Date: Fri, 10 Aug 2012 09:37:35 +0300 Message-ID: <83ehnfdzgw.fsf@gnu.org> References: <83obmkdoli.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1344580674 20604 80.91.229.3 (10 Aug 2012 06:37:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 06:37:54 +0000 (UTC) Cc: 12163@debbugs.gnu.org To: qq510371827 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 10 08:37:55 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Szir4-0007A1-Sm for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 08:37:55 +0200 Original-Received: from localhost ([::1]:47549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szir4-00021Z-24 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 02:37:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sziqz-00020s-TM for bug-gnu-emacs@gnu.org; Fri, 10 Aug 2012 02:37:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sziqy-0004PR-NA for bug-gnu-emacs@gnu.org; Fri, 10 Aug 2012 02:37:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sziqy-0004PN-K5 for bug-gnu-emacs@gnu.org; Fri, 10 Aug 2012 02:37:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sziyv-0002rh-KI for bug-gnu-emacs@gnu.org; Fri, 10 Aug 2012 02:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Aug 2012 06:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12163 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12163-submit@debbugs.gnu.org id=B12163.134458115110986 (code B ref 12163); Fri, 10 Aug 2012 06:46:01 +0000 Original-Received: (at 12163) by debbugs.gnu.org; 10 Aug 2012 06:45:51 +0000 Original-Received: from localhost ([127.0.0.1]:45870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sziyk-0002r8-OJ for submit@debbugs.gnu.org; Fri, 10 Aug 2012 02:45:51 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:34357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sziye-0002qW-SB for 12163@debbugs.gnu.org; Fri, 10 Aug 2012 02:45:47 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M8J0000004HS600@a-mtaout21.012.net.il> for 12163@debbugs.gnu.org; Fri, 10 Aug 2012 09:37:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M8J000VN12HNN90@a-mtaout21.012.net.il>; Fri, 10 Aug 2012 09:37:29 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62988 Archived-At: [Please keep the bug address in the CC list.] > From: qq510371827 > Date: Fri, 10 Aug 2012 10:58:11 +0800 > > Thanks for your help.But it doesn't work yet. I added : > setbuf(stdin,NULL); > setbuf(stdout,NULL); > or, > setvbuf(stdin,NULL,_IONBF,0); > setvbuf(stdout,NULL,_IONBF,0); > and > fflush(stdout) after printf, > All of the above didn't work, None output when debugging my application.In > addition,I can not input values during debugging yet. for instance, > 1...........scanf("%c",s); > 2........... > 3........... > 4...........i=0; // set breakpoint at this line > During the debugging,*What is the expected result?* > It should suspend and wait IO buffer's input values. Then after I input a > value in IO buffer and press RET it resumed and stopped at line 4 ( it hit > the breakpoint). > *But in fact What happens instead?* > It run and directly stopped at line 4 and didn't give me a chance to input > anything. I still input some values in io buffer and press RET but it > didn't give me a response. It seems as if the debugger didn't recognize > emacs' input/ouput IO buffer to be its input/output pipe and still kept > waitting for input. > This problem only appeared in emacs 24.1. Emacs 23.4 works very well > without this problem. Try invoking GDB from Emacs like this: M-x gud-gdb RET If that doesn't help, either, then I'm clueless, sorry. Perhaps someone else could help.