GNU bug report logs - #12163
24.1; Can not input anything or showing none output when debugging c/c++ application.

Previous Next

Package: emacs;

Reported by: qq510371827 <qq510371827 <at> gmail.com>

Date: Thu, 9 Aug 2012 16:00:01 UTC

Severity: normal

Tags: moreinfo

Merged with 12180

Found in version 24.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: qq510371827 <qq510371827 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#12163: 24.1; Can not input anything or showing none output
	when debugging c/c++ application.
Date: Fri, 10 Aug 2012 17:14:14 +0800
[Message part 1 (text/plain, inline)]
2012/8/10 Eli Zaretskii <eliz <at> gnu.org>

> [Please keep the bug address in the CC list.]
> Sorry,it's my first time to file a bug report here. I will do as what you
> said.
> > From: qq510371827 <qq510371827 <at> gmail.com>
> > 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.
>
 Thanks for your patience. It finally works. However, two other new
problem appeared after using 'gud-gdb'.
1).the code, gdb information and out/input datas mixed together in the same
buffer and 'gdb-many-windows' command didn't work any more.
2) You can refer this link:
 http://stackoverflow.com/questions/9676135/gud-gdb-emacs-24-not-working
The same problem as mine.
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.