public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <akale@veritas.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: Paul J Albrecht <pjalbrecht@home.com>, linux-kernel@vger.kernel.org
Subject: Re: Linux Kernel Debuggers, KDB or KGDB?
Date: Thu, 03 May 2001 15:46:10 +0100	[thread overview]
Message-ID: <3AF16F32.A10EB093@veritas.com> (raw)
In-Reply-To: <5003.988844635@ocs3.ocs-net>

Keith Owens wrote:
> 
> On Wed, 2 May 2001 16:06:15 -0500,
> Paul J Albrecht <pjalbrecht@home.com> wrote:
> >I'd like to know more about your plans to enhance KDB with source level debug
> >capability.
> 
> Use a combination of gdb and kdb.  kdb to support kernel internals, gdb
> to take the kdb output and add source level data.  It needs two
> machines, one that is running to support gdb, the second machine is
> being debugged, with a serial console between them.

This is how solaris ksld (kernel source level debugger
works). solaris dbx connects to a kernel stub which
serves as kadb (solaris assembly level debugger) as
well as a debugger stub.

> The problem will be stopping gdb from making assumptions about the
> machine being debugged.  Instead of changing gdb code, use a gdb
> wrapper program to intercept user commands and gdb serial protocol and
> convert them to kdb commands.

I am not sure if kdb provides access to kernel threads
in a form that can be conveniently by a wrapper
program.

Interested people can check whether all features of kgdb
(http://kgdb.sourceforge.net/) are available in convenient
form in kdb.

The logic of holding slave cpus (the cpu in the debugger
is the master while others are slaves) is different in kdb
and kgdb. Handling of nmi-watchdog too is different.

> 
> >Would you have to boot an unstripped kernel executable whenever you
> >wanted to debug?
> 
> Boot, no.  But the machine running gdb will need an copy of the
> unstripped vmlinux and module objects to get the debug information.

Plus all the sources.

All this is required by gdb. In theory gdb could do well
with just source code and symbol information only, though
for lack of a symbol information requesting packet in
the gdb remote protocol, gdb can't get symbol information
directly from the stub.

There is some effort in gdb world to allow a stub to query
gdb for symbol information. Probably the reverse can also
be added. Need someone good understanding of gdb to do
that.

It's because of these reasons that kgdb module debugging setup
is combersome.

> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Amit Kale
Veritas Software ( http://www.veritas.com )

  reply	other threads:[~2001-05-03 14:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-30 21:17 Linux Kernel Debuggers, KDB or KGDB? Paul J Albrecht
2001-05-01  0:11 ` Jeff Dike
2001-05-01  9:37   ` Ingo Oeser
2001-05-01 15:22     ` Jeff Dike
2001-05-02 14:44       ` Ingo Oeser
2001-05-02 17:54         ` Jeff Dike
2001-05-02 16:55           ` Alan Cox
2001-05-02 19:06             ` Jeff Dike
2001-05-02 18:54               ` Bill Nottingham
2001-05-01  1:16 ` Keith Owens
2001-05-01 10:59   ` Amit S. Kale
2001-05-02 14:58   ` Andi Kleen
2001-05-02 21:06   ` Paul J Albrecht
2001-05-02 23:03     ` Keith Owens
2001-05-03 14:46       ` Amit S. Kale [this message]
     [not found] <linux.kernel.18223.988679810@kao2.melbourne.sgi.com>
2001-05-01  7:13 ` Aaron Passey

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=3AF16F32.A10EB093@veritas.com \
    --to=akale@veritas.com \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjalbrecht@home.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox