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 g...@lemis.com for PGP public key To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message