From owner-freebsd-questions Wed Jul 30 09:49:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA14599 for questions-outgoing; Wed, 30 Jul 1997 09:49:00 -0700 (PDT) Received: from xmission.xmission.com (softweyr@xmission.xmission.com [198.60.22.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA14581; Wed, 30 Jul 1997 09:48:21 -0700 (PDT) Received: (from softweyr@localhost) by xmission.xmission.com (8.8.5/8.7.5) id KAA10598; Wed, 30 Jul 1997 10:47:58 -0600 (MDT) From: Wes Peters - Softweyr LLC Message-Id: <199707301647.KAA10598@xmission.xmission.com> Subject: Re: gud-mode: gdb inside emacs To: grog@FreeBSD.ORG Date: Wed, 30 Jul 1997 10:47:57 -0600 (MDT) Cc: shegonee@ix11.ix.netcom.com, questions@FreeBSD.ORG In-Reply-To: <199707300743.RAA00776@freebie.lemis.com> from "grog@FreeBSD.ORG" at Jul 30, 97 05:13:02 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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-*) 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