unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* problems in gud under emacs
@ 2011-10-18 11:06 Chun Zhang
  2011-10-18 15:13 ` S Boucher
  0 siblings, 1 reply; 3+ messages in thread
From: Chun Zhang @ 2011-10-18 11:06 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Hi all,

I'm running into problems debugging c++ under emacs. When I start the
debugging command:

M-x gdb --annotate=3 myprogram

The gdb shell does not prompt. Instead it stuck after showing "(gdb) Current
directory is ~/programs/small/" as pasted below. I can't type any debug
command then... However the status bar shows no error messages. Does any
body know how to fix it? Thank you!

GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/chzhang/programs/small/loop...done.
(gdb) Current directory is ~/programs/small/


-- 
Best Regards,

======================
Chun Zhang
chun.zhang.cz@gmail.com

[-- Attachment #2: Type: text/html, Size: 6517 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems in gud under emacs
  2011-10-18 11:06 problems in gud under emacs Chun Zhang
@ 2011-10-18 15:13 ` S Boucher
  2011-10-18 15:21   ` Chun Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: S Boucher @ 2011-10-18 15:13 UTC (permalink / raw)
  To: Chun Zhang, help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Try running gdb outside of emacs, and use the --nx gdb command line option.

gdb --nx myprogram

and in emacs:

gdb --nx --annotate=3 myprogram

gud (emacs gdb) is not super robust.  It can get confused about the state of gdb when gdb has weird output.

Your "Current directory ...." should really be the first line.  Certainly, there shouldn't be anything after (gdb).  So, gud may well be confused.



>________________________________
>From: Chun Zhang <chun.zhang.cz@gmail.com>
>To: help-gnu-emacs@gnu.org
>Sent: Tuesday, October 18, 2011 7:06:24 AM
>Subject: problems in gud under emacs
>
>
>Hi all,
>I'm running into problems debugging c++ under emacs. When I start the debugging command:
>M-x gdb --annotate=3 myprogram
>The gdb shell does not prompt. Instead it stuck after showing "(gdb) Current directory is ~/programs/small/" as pasted below. I can't type any debug command then... However the status bar shows no error messages. Does any body know how to fix it? Thank you!
>GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 
>Copyright (C) 2010 Free Software Foundation, Inc. 
>License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html 
>This is free software: you are free to change and redistribute it. 
>There is NO WARRANTY, to the extent permitted by law. Type "show copying" 
>and "show warranty" for details. 
>This GDB was configured as "x86_64-linux-gnu". 
>For bug reporting instructions, please see: 
>http://www.gnu.org/software/gdb/bugs/... 
>Reading symbols from /home/chzhang/programs/small/loop...done. 
>(gdb) Current directory is ~/programs/small/ 
>
>
>
>
>-- 
>Best Regards,
>
>======================
>Chun Zhang
>chun.zhang.cz@gmail.com
>
>
>

[-- Attachment #2: Type: text/html, Size: 4488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problems in gud under emacs
  2011-10-18 15:13 ` S Boucher
@ 2011-10-18 15:21   ` Chun Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Chun Zhang @ 2011-10-18 15:21 UTC (permalink / raw)
  To: S Boucher; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]

Thanks a lot. But actually I don't have the .gdbinit file.

Now instead of installing emacs through apt-get, I checked out and compiled
the 23.3a version. The problem is well solved.

On Tue, Oct 18, 2011 at 11:13 PM, S Boucher <stbya@yahoo.com> wrote:

> Try running gdb outside of emacs, and use the --nx gdb command line option.
>
> gdb --nx myprogram
>
> and in emacs:
>
> gdb --nx --annotate=3 myprogram
>
> gud (emacs gdb) is not super robust.  It can get confused about the state
> of gdb when gdb has weird output.
>
> Your "Current directory ...." should really be the first line.  Certainly,
> there shouldn't be anything after (gdb).  So, gud may well be confused.
>
> ------------------------------
> *From:* Chun Zhang <chun.zhang.cz@gmail.com>
> *To:* help-gnu-emacs@gnu.org
> *Sent:* Tuesday, October 18, 2011 7:06:24 AM
> *Subject:* problems in gud under emacs
>
>  Hi all,
> I'm running into problems debugging c++ under emacs. When I start the
> debugging command:
> M-x gdb --annotate=3 myprogram
> The gdb shell does not prompt. Instead it stuck after showing "(gdb)
> Current directory is ~/programs/small/" as pasted below. I can't type any
> debug command then... However the status bar shows no error messages. Does
> any body know how to fix it? Thank you!
>  GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> http://gnu.org/licenses/gpl.html
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> http://www.gnu.org/software/gdb/bugs/...
> Reading symbols from /home/chzhang/programs/small/loop...done.
> (gdb) Current directory is ~/programs/small/
>
>
> --
> Best Regards,
>
> ======================
> Chun Zhang
> chun.zhang.cz@gmail.com
>
>
>


-- 
Best Regards,

======================
Chun Zhang
chun.zhang.cz@gmail.com

[-- Attachment #2: Type: text/html, Size: 5016 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-18 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 11:06 problems in gud under emacs Chun Zhang
2011-10-18 15:13 ` S Boucher
2011-10-18 15:21   ` Chun Zhang

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).