all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Sanjeev Kumar.S" <sanjeevfiles@yahoo.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Tim X <timx@nospam.dev.null>, help-gnu-emacs@gnu.org
Subject: Re: kgdb in emacs
Date: Sun, 27 Jan 2008 00:53:27 -0800 (PST)	[thread overview]
Message-ID: <177972.91003.qm@web57709.mail.re3.yahoo.com> (raw)
In-Reply-To: <18332.16451.636317.296261@kahikatea.snap.net.nz>


[-- Attachment #1.1: Type: text/plain, Size: 3233 bytes --]

Thank you very much Nick, Your clue of emacs version prompted me
to upgrade my emacs. after which I'm able to do it.
BTW,  my earlier emacs version was 21.2.4 and now it is 22.0.50.1

One more question: I'm still not able to open the file another emacs
window. I thought this was supposed happen automatically. In other
instances of emacs ( like when debugging apps ) the source code file
opens automatically in another emacs window ( vertical split style).
Even if it doesn't, when I enter "f" it opens up automatically.

One possibility is, though i changed the emacs current directory
to /usr/obj/usr/src/sys/MYKERNEL/ , the -r /dev/cuad0 option would have
changed the default directory, as evident in the file line when a gud
window is opened:
Current directory is /dev/
:(

I tried changing the current directory again to .../MYKERNEL/ but still
"f" doesn't open the source in another window ?

Any suggestions ?

Thanks again & Regards,
Sanjeev.

Nick Roberts <nickrob@snap.net.nz> wrote:  >      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


       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

[-- Attachment #1.2: Type: text/html, Size: 3831 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

  reply	other threads:[~2008-01-27  8:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 17:14 Mysterious hidden end of line characters David
2008-01-26 19:21 ` Thierry Volpiatto
2008-01-26 19:54   ` David
2008-01-26 20:06   ` David
2008-01-26 20:08     ` David
     [not found]   ` <mailman.6584.1201377847.18990.help-gnu-emacs@gnu.org>
2008-01-27  6:10     ` Tim X
2008-01-27  7:17       ` kgdb in emacs Sanjeev Kumar.S
2008-01-27  8:26         ` Nick Roberts
2008-01-27  8:53           ` Sanjeev Kumar.S [this message]
2008-01-27  9:23             ` Nick Roberts
2008-01-27 10:17               ` Sanjeev Kumar.S
2008-01-27 10:51                 ` Nick Roberts
2008-01-27 11:21                   ` Sanjeev Kumar.S
2008-01-27 20:40                     ` Nick Roberts
2008-01-26 20:41 ` Mysterious hidden end of line characters Peter Dyballa
2008-01-30 15:04   ` David
     [not found]   ` <mailman.6748.1201705322.18990.help-gnu-emacs@gnu.org>
2008-01-31  6:21     ` Tim X
2008-01-31 10:20       ` Thierry Volpiatto
2008-01-31 11:17         ` Peter Dyballa
2008-01-31 12:44           ` Thierry Volpiatto
2008-01-31 16:04           ` Thierry Volpiatto
2008-01-31 16:12           ` Thierry Volpiatto
2008-01-31 16:40           ` Thierry Volpiatto
2008-02-02 14:18           ` Thierry Volpiatto
2008-02-04 13:00           ` Thierry Volpiatto
2008-02-04 13:10           ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=177972.91003.qm@web57709.mail.re3.yahoo.com \
    --to=sanjeevfiles@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nickrob@snap.net.nz \
    --cc=timx@nospam.dev.null \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.