Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Eli Zaretskii
> Date: Wed, 21 Mar 2012 21:09:52 +0100 > From: Dani Moncayo > Cc: help-emacs-windows@gnu.org, help-gnu-em...@gnu.org > > main.c - > #include > > int main(void) > { >printf("hello, world!\n"); >fflush(stdout); >return 0; > } > - > >

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
> If you add the newline, the output appears at the end, but not in the > input/output buffer. > > If there's no newline, I wouldn't expect the output to appear at all, > in such a short program, since standard output redirected to pipes is > fully-buffered on Windows, not line-buffered as on Posix

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Eli Zaretskii
> Date: Wed, 21 Mar 2012 08:33:40 +0100 > From: Dani Moncayo > Cc: help-emacs-windows@gnu.org, help-gnu-em...@gnu.org > > > There is no newline in the intended output, so perhaps the output isn't > > flushed yet. Does it appear if you step through the rest of the program? > > I've tried it and n

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Matt McClure
On Tue, Mar 20, 2012 at 4:21 PM, Dani Moncayo wrote: > At this point, the *input/output of p1.exe* buffer should show the > "hello, world!" message written to the standard output, right? But I > observe that the buffer remains empty (see attached screenshot). > Just a guess: There is no newlin

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Bob Proulx
Dani Moncayo wrote: > > Please add a newline to the output. I think that without the newline > > the output may be covered by other output. I think it likely that the > > output is actually being output but just covered. > > > > - printf("hello, world!"); > > + printf("hello, world!\n"); > > I

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Peter Dyballa
Am 21.3.2012 um 08:33 schrieb Dani Moncayo: > gcc -g --all-warnings -Wall -Wextra -o p1.exe main.c -g produces debug information in the default format, maybe you need to use -ggdb to get "debug information in default extended format". (It might also be useful to try the build with the additi

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Bob Proulx
Dani Moncayo wrote: > > There is no newline in the intended output, so perhaps the output isn't > > flushed yet. Does it appear if you step through the rest of the program? > > I've tried it and not, it never appears, even after I've reached the > end of the program. Please add a newline to the o

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
> Did you try to run it under bare gdb (without Emacs)? If the problem > remains, it's gdb issue rather than Emacs one. Good question. I've just debugged the program directly under gdb (invoked from a cmd.exe console) and everything looks fine (I see the "hello, world" message). I'm beginning to

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Sergei Organov
Dani Moncayo writes: > Hello Emacs, > > I'm trying to test the Emacs gdb interface, but there is something I > don't yet understand. > > This is my setup: > * OS: MS-Windows 7. > * Development Environment: MinGW. > > I've done this: > * I've written a "hello world" program [1]. > * I've compiled

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
>> If that was the case, it would cause a lot of confusion to users, but >> fortunately, that's not the case (I've just tested it and I see no >> output either). > > It may be confusing but it is no different from having this case: > >  rwp@discord:~$ printf "Hello" ; printf "\r" >  rwp@discord:~$

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
>>   gcc -g --all-warnings -Wall -Wextra -o p1.exe main.c > > -g produces debug information in the default format, maybe you need to use > -ggdb to get "debug information in default extended format". (It might also > be useful to try the build with the additional switches > -feliminate-unused-de

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
> Please add a newline to the output.  I think that without the newline > the output may be covered by other output.  I think it likely that the > output is actually being output but just covered. > > -  printf("hello, world!"); > +  printf("hello, world!\n"); If that was the case, it would cause

Re: [h-e-w] Emacs gdb interface

2012-03-21 Thread Dani Moncayo
> There is no newline in the intended output, so perhaps the output isn't > flushed yet. Does it appear if you step through the rest of the program? I've tried it and not, it never appears, even after I've reached the end of the program. Thanks for answering. BTW: I did not wrote the compilation