* Emacs GDB garbled output
@ 2017-03-07 12:08 Augusto Fraga Giachero
2017-03-07 15:48 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Augusto Fraga Giachero @ 2017-03-07 12:08 UTC (permalink / raw)
To: help-gnu-emacs
Hello Emacs users!
I've been using Emacs + GDB (GUD) for debugging programs written in C
since more or less 2 years. I generally recompile my projects by just
invoking 'make' in the GDB shell.
What bothers me is that when the build process outputs a lot of text in
a short period of time (such a compile error or warnings) the GDB shell
doesn't catch all the text, and sometimes part of the text is displayed
when the next command is executed. For example:
GDB under Emacs:
(gdb) make
gcc -MMD -c -g -Wall -I inc/ -Og src/testlib.c -o src/testlib.o
src/testlib.c:4:1: error: expected ‘ int isPrime(uint64_t num)
stop
make: (gdb)
Standalone GDB:
gcc -MMD -c -g -Wall -I inc/ -Og src/testlib.c -o src/testlib.o
src/testlib.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘int’
int isPrime(uint64_t num)
^~~
make: *** [Makefile:27: src/testlib.o] Error 1
Anyone that have experienced this behavior known how to fix it?
Thanks,
Augusto Fraga Giachero.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs GDB garbled output
2017-03-07 12:08 Emacs GDB garbled output Augusto Fraga Giachero
@ 2017-03-07 15:48 ` Eli Zaretskii
2017-03-07 19:34 ` Augusto Fraga Giachero
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2017-03-07 15:48 UTC (permalink / raw)
To: help-gnu-emacs
> From: Augusto Fraga Giachero <augustofg96@gmail.com>
> Date: Tue, 7 Mar 2017 09:08:33 -0300
>
> I've been using Emacs + GDB (GUD) for debugging programs written in C
> since more or less 2 years. I generally recompile my projects by just
> invoking 'make' in the GDB shell.
>
> What bothers me is that when the build process outputs a lot of text in
> a short period of time (such a compile error or warnings) the GDB shell
> doesn't catch all the text, and sometimes part of the text is displayed
> when the next command is executed. For example:
>
> GDB under Emacs:
> (gdb) make
> gcc -MMD -c -g -Wall -I inc/ -Og src/testlib.c -o src/testlib.o
> src/testlib.c:4:1: error: expected ‘ int isPrime(uint64_t num)
> stop
> make: (gdb)
Which Emacs command do you use to invoke GDB? Is it "M-x gud-gdb" or
"M-x gdb"?
If you used the latter, try the former instead.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs GDB garbled output
2017-03-07 15:48 ` Eli Zaretskii
@ 2017-03-07 19:34 ` Augusto Fraga Giachero
0 siblings, 0 replies; 3+ messages in thread
From: Augusto Fraga Giachero @ 2017-03-07 19:34 UTC (permalink / raw)
To: help-gnu-emacs
You nailed it!
I was invoking gdb with 'M-x gdb'. Now using 'M-x gud-gdb' instead
solved all my problems.
Thank you very much!
Augusto Fraga Giachero.
On 07-03-2017 12:48, Eli Zaretskii wrote:
>> From: Augusto Fraga Giachero <augustofg96@gmail.com>
>> Date: Tue, 7 Mar 2017 09:08:33 -0300
>>
>> I've been using Emacs + GDB (GUD) for debugging programs written in C
>> since more or less 2 years. I generally recompile my projects by just
>> invoking 'make' in the GDB shell.
>>
>> What bothers me is that when the build process outputs a lot of text in
>> a short period of time (such a compile error or warnings) the GDB shell
>> doesn't catch all the text, and sometimes part of the text is displayed
>> when the next command is executed. For example:
>>
>> GDB under Emacs:
>> (gdb) make
>> gcc -MMD -c -g -Wall -I inc/ -Og src/testlib.c -o src/testlib.o
>> src/testlib.c:4:1: error: expected ‘ int isPrime(uint64_t num)
>> stop
>> make: (gdb)
> Which Emacs command do you use to invoke GDB? Is it "M-x gud-gdb" or
> "M-x gdb"?
>
> If you used the latter, try the former instead.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-07 19:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 12:08 Emacs GDB garbled output Augusto Fraga Giachero
2017-03-07 15:48 ` Eli Zaretskii
2017-03-07 19:34 ` Augusto Fraga Giachero
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).