From: Eli Zaretskii <eliz@gnu.org>
To: qq510371827 <qq510371827@gmail.com>
Cc: 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 09:37:35 +0300 [thread overview]
Message-ID: <83ehnfdzgw.fsf@gnu.org> (raw)
In-Reply-To: <CAORnh3gDSy9iG=o8E=Hnx=UaqzM6+Of5iN99-7Gyp46iVVMJHw@mail.gmail.com>
[Please keep the bug address in the CC list.]
> 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.
next prev parent reply other threads:[~2012-08-10 6:37 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 [this message]
2012-08-10 9:14 ` qq510371827
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=83ehnfdzgw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=12163@debbugs.gnu.org \
--cc=qq510371827@gmail.com \
/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).