Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 2014 11:04:56 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        FreeBSD ARM <freebsd-arm@FreeBSD.org>
Subject:   Re: Looking for FreeBSD u-boot/kernel debugging help (BeagleBone Black)
Message-ID:  <1398618296.61646.161.camel@revolution.hippie.lan>
In-Reply-To: <20140426233438.49123B827@mail.bitblocks.com>
References:  <CADH-AwHN0=p4z0RJZNcoRdoDJTMVAtK5F3TNCh5qdMWessQ0KQ@mail.gmail.com> <20140426233438.49123B827@mail.bitblocks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2014-04-26 at 16:34 -0700, Bakul Shah wrote:
> On Sat, 26 Apr 2014 18:29:35 EDT Winston Smith <smith.winston.101@gmail.com> wrote:
> >                              I also discovered that if I disconnect my
> > serial terminal and reconnect it, it seems to bring the FreeBSD kernel
> > to a debug prompt of sorts -- is there any documentation on this?
> 
> I suspect disconnecting/reconnecting the serial cable looks like
> a break to the kernel and that drops it into the debugger "ddb".
> [Though I can't seem to send a real break to it using kermit!]
> 
> Type c and hit return to continue. 
> 
> To disable this behavior I think you can do
> 	sysctl debug.kbd.break_to_debugger=0
> or add
> 	debug.kbd.break_to_debugger=0
> to /etc/sysctl.conf
> 
> man 1 ddb -- for debugger commands
> man 4 ddb -- for kernel config options to control ddb behavior

That's exactly correct -- connecting the cable sometimes leads to a
spurious break being asserted on the line (a break is just a long
sequence of zeroes with no start/stop/data bit transitions).

It's possible to configure a kernel without BREAK_TO_DEBUGGER and with
ALT_BREAK_TO_DEBUGGER.  That eliminates most line-noise spurious breaks
but still allows the <CR> ~ ^b break sequence (which could theoretically
happen in a burst of line noise, but not likely).  A few of our kernels
have BREAK_TO_DEBUGGER in the config, and I think that's probably a
mistake.  Most folks these days don't know anything about breaks or how
to generate one on purpose.  

Any objections to removing them and using only the safer ALT_BREAK
option?

-- Ian





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