From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.help Subject: Re: kgdb in emacs Date: Sun, 27 Jan 2008 21:26:43 +1300 Message-ID: <18332.16451.636317.296261@kahikatea.snap.net.nz> References: <87ir1fn6iv.fsf@lion.rapttech.com.au> <863920.83800.qm@web57705.mail.re3.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201423747 25294 80.91.229.12 (27 Jan 2008 08:49:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jan 2008 08:49:07 +0000 (UTC) Cc: Tim X , help-gnu-emacs@gnu.org To: "Sanjeev Kumar.S" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 09:49:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJ3Cf-0006J5-9d for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 09:49:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ3CE-0006gQ-Lz for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Jan 2008 03:48:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJ3Bw-0006gL-W9 for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 03:48:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJ3Bw-0006fq-0n for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 03:48:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJ3Bv-0006fn-T7 for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 03:48:39 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJ3Bv-0001Px-HP for help-gnu-emacs@gnu.org; Sun, 27 Jan 2008 03:48:40 -0500 Original-Received: from kahikatea.snap.net.nz (162.63.255.123.dynamic.snap.net.nz [123.255.63.162]) by viper.snap.net.nz (Postfix) with ESMTP id 93A2D3DA3CF; Sun, 27 Jan 2008 21:26:48 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 06F2C8FC6D; Sun, 27 Jan 2008 21:26:44 +1300 (NZDT) In-Reply-To: <863920.83800.qm@web57705.mail.re3.yahoo.com> X-Mailer: VM 7.19 under Emacs 23.0.60.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51003 Archived-At: > I'm trying to use kgdb in emacs on Freebsd V6.2. I'm able to use kgdb > on the command line like this > kgdb -r /dev/cuad0 kernel.debug. > In 6.2 there is no gdb -k, only kgdb. When can you use gdb -k? With the latest GDB from CVS, I get: $ gdb -k gdb: unrecognized option `-k' > But when I run it in emacs. M-x gdb > Run gdb ( like this ) : kgdb -r /dev/cuad0 kernel.debug > I get : > Current directory is /dev/ > kgdb: multiple core files specified. Ignored > kgdb: d: No such file or directory. > Debugger exited abnormally with code 1 > > Why is emacs even interpretting my commands. > Why doesn't it just call kgdb with whatever arguments > I give ? For some debuggers Emacs adds extra arguments. It's also trying to parse the name of the executable from the command line for the mode-line and hasn't been designed with kgdb in mind. I've not used kgdb and you don't say what version of Emacs you are using, but I know kgdb can work in Emacs (and with Freebsd) because I've seen this screenshot: http://people.freebsd.org/~simokawa/gdb/dcons-emacs-gud.PNG and this description: http://wiki.freebsd.org/DebugWithDcons where Hidetoshi Shimokawa sets gud-gdba-command-name (setq gud-gdba-command-name "kgdb -a -a -a -r :12345") It looks like "-a -a -a" sets the annotation level to 3 as needed by the Graphical Interface (Emacs 22 only). Text mode (or Emacs 21 or earlier) presumably works with just "-a". > Current directory is /dev/ It thinks the executable is /dev/cuad0, being the first argument that doesn't start with a hyphen. > kgdb: multiple core files specified. Ignored > kgdb: d: No such file or directory. I don't know what has happened here because this seems to parse correctly > Debugger exited abnormally with code 1 Assuming kgdb is a bit like gdb with a remote target, does: Run gdb ( like this ) : kgdb -a -a -a kernel.debug (kgdb) target remote /dev/cuad0 work? -- Nick http://www.inet.net.nz/~nickrob