Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 1999 09:35:30 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Kernel debugging questions
Message-ID:  <19990820093530.G14964@freebie.lemis.com>
In-Reply-To: <Pine.GSO.3.96.990819120726.26959A-100000@sol.cs.binghamton.edu>; from Zhihui Zhang on Thu, Aug 19, 1999 at 12:15:51PM -0400
References:  <Pine.GSO.3.96.990819120726.26959A-100000@sol.cs.binghamton.edu> <199908191934.MAA07552@dingo.cdrom.com> <Pine.GSO.3.96.990819120726.26959A-100000@sol.cs.binghamton.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, 19 August 1999 at 12:15:51 -0400, Zhihui Zhang wrote:
>
> I am using FreeBSD 4.0 and have two questions on kernel debugging:
>
> (2) After bootup, I try the following to debug the live system (after
> reading some pages of the book "Panic! Unix system crash dump analysis"):
>
> now4# gdb -k /kernel.debug /dev/mem
> (kgdb) run
> Starting program: /kernel.debug
>
> Program terminated with signal SIGABRT, Aborted.
> The program no longer exists.
> You can't do that without a process to debug.
>
> Is there something wrong?

Yes.  You shouldn't try to run the kernel.

> I did the same thing with the postmortem coredump files and got
> similar messages.  Maybe I am using gdb in a wrong way.

You can't control the execution of the kernel, you can just look at
the way things are.  With the core dump, you at least have the
advantage that things won't change while you look at them; you can't
even do that with /dev/mem.  The other alternative is remote serial
debugging, where you *can* influence the execution of the kernel, for
example by setting breakpoints.  But remember that the kernel is
already running when you attach to it, so you don't say 'run', you say
'c[ontinue]'.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990820093530.G14964>