From: qq510371827 <qq510371827@gmail.com>
To: 12163@debbugs.gnu.org
Subject: 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 [thread overview]
Message-ID: <CAORnh3guaiS0feFz3kH47fyp3JqkyBtfujKxFQ4TZetwZSjLTA@mail.gmail.com> (raw)
In-Reply-To: <83ehnfdzgw.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]
2012/8/10 Eli Zaretskii <eliz@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@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.
[-- Attachment #2: Type: text/html, Size: 3129 bytes --]
next prev parent reply other threads:[~2012-08-10 9:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 14:54 bug#12163: 24.1; Can not input anything or showing none output when debugging c/c++ application qq510371827
[not found] ` <83obmkdoli.fsf@gnu.org>
[not found] ` <CAORnh3gDSy9iG=o8E=Hnx=UaqzM6+Of5iN99-7Gyp46iVVMJHw@mail.gmail.com>
2012-08-10 6:37 ` Eli Zaretskii
2012-08-10 9:14 ` qq510371827 [this message]
2012-08-10 9:50 ` Eli Zaretskii
2012-08-10 10:18 ` qq510371827
2012-08-10 17:57 ` Eli Zaretskii
2012-08-11 12:32 ` qq510371827
2012-08-11 14:31 ` Eli Zaretskii
[not found] ` <CAORnh3gFYYVmB7gujppmv3cs6rGm6Dei1vPYxGixtnVLSXrC5w@mail.gmail.com>
2012-08-11 15:11 ` bug#12180: Fwd: " qq510371827
2012-08-11 16:15 ` bug#12180: " Eli Zaretskii
2012-08-12 1:32 ` qq510371827
2012-08-12 17:56 ` Eli Zaretskii
2012-08-13 14:00 ` qq510371827
2022-02-07 0:05 ` bug#12163: bug#12180: Fwd: " Lars Ingebrigtsen
2022-03-07 2:37 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAORnh3guaiS0feFz3kH47fyp3JqkyBtfujKxFQ4TZetwZSjLTA@mail.gmail.com \
--to=qq510371827@gmail.com \
--cc=12163@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).