|
From: | Sanjeev Kumar.S |
Subject: | Re: kgdb in emacs |
Date: | Sun, 27 Jan 2008 00:53:27 -0800 (PST) |
> 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
[Prev in Thread] | Current Thread | [Next in Thread] |