Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 1997 15:08:47 -0700 (MST)
From:      Nate Williams <nate@mt.sri.com>
To:        Bakul Shah <bakul@torrentnet.com>
Cc:        hackers@freebsd.org
Subject:   Re: kernel remote debugging using gdb
Message-ID:  <199703142208.PAA07831@rocky.mt.sri.com>
In-Reply-To: <199703142053.PAA00554@chai.plexuscom.com>
References:  <199703142053.PAA00554@chai.plexuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> What I did:
> 
> - recompiled the boot program to always use COM1 as console and
>   installed it on the primary disk on the test machine (called TEST).
> 
> - used the following options in the TEST config file:
>     options         COMCONSOLE

You don't need COMCONSOLE for this to work, as a matter of fact you
really don't want it due to the problems you've outlined below.

> There are two problems:
> 
> - Sendind a break in multiuser mode (before or after attaching gdb)
>   does not seem to drop the kernel in the debugger.  This seems to
>   work occasionally but I haven't as yet figured out under what
>   conditions.

I suspect the break is lost.  If you aren't using the COMCONSOLE, do it
on the real console.

> - In single user mode when gdb is attached, you can not type anything
>   on the console nor can you see any printf() output[1].

That's because trying to MUX the gdb connection and the console is not a
good idea.  Serial debugging should not be attempted for remote
connections simply because you can hang yourself.


Nate



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