Date: Wed, 30 Jul 1997 10:47:57 -0600 (MDT) From: Wes Peters - Softweyr LLC <softweyr@xmission.com> To: grog@FreeBSD.ORG Cc: shegonee@ix11.ix.netcom.com, questions@FreeBSD.ORG Subject: Re: gud-mode: gdb inside emacs Message-ID: <199707301647.KAA10598@xmission.xmission.com> In-Reply-To: <199707300743.RAA00776@freebie.lemis.com> from "grog@FreeBSD.ORG" at Jul 30, 97 05:13:02 pm
next in thread | previous in thread | raw e-mail | index | archive | help
shegonee@ix.netcom.com asked:
% I have a program compiled with the -g option. When I run gdb inside of emacs
% it starts gdb fine but doesn't open a second window with the source code
% in it. Is there anything else I need to do to get gdb inside emacs
% to run and open a second window with the source code file in it?
Use M-x gdb to start gdb. When you get the gud-mode window up, use C-x
2 to split the window, and C-x b to switch the current window back to
your source file. Now, if you set a breakpoint and run the program,
when the breakpoint is hit, you'll see a '=>' pointing to the source
line in your source window.
Grog replied:
> I suppose that this depends on how you started it. If you do M-x gdb,
> it should prompt you for the name of a program to run. You enter the
> name of the program, and it opens a new buffer the same window. When
> you start running the program, it opens a new window in the same frame
> with the source code. You should then be able to enter gdb commands
> in the gdb window (which will be called *gdb-<program name>*) and look
> at the source in the other window.
>
> Although I'm a great user of both Emacs and gdb, I find that the
> combination doesn't work very well. I prefer to run gdb from an
> xterm.
I find gud-mode quite usable with a large X screen, at least 17" and
1024x768 pixels. Anything smaller just doesn't give you enough info
in the gdb and source windows.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
http://www.xmission.com/~softweyr softweyr@xmission.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707301647.KAA10598>
