On 2023-05-29, Sebastien Marie <sema...@online.fr> wrote:
> On Mon, May 29, 2023 at 02:41:00PM +1000, Aaron Mason wrote:
>> On Mon, May 29, 2023 at 4:08 AM Paul de Weerd <we...@weirdnet.nl> wrote:
>> >
>> >           (for the record, BREAK doesn't work either to enter ddb, I
>> > guessed it was due to the USB-to-serial dongle I'm using (uplcom(4)
>> > lacking support for sending a proper BREAK .. but this may be the same
>> > issue?)

fwiw BREAK does usually work in uplcom. It's uark that is known not to work.
(but since a BREAK is just holding the line at 0 for longer than a normal
character transmission time, if the console port speed is fairly high,
it's easy to send something that will be interpreted as break by setting
a low speed on the transmitting port and sending a char with enough 0 bits
in it).

> From the code, to use ddb.trigger (aka DBCTL_TRIGGER), you need:
>
> - kern.securelevel < 1 (on a running system, kern.securelevel = -1)
> OR
> - something related to the console (I suppose "having the tty of the current 
>   process being the same than the console")
>
> If you are connected to serial, but your console is on VGA, it might be 
> related.

If that's the case, 1) it would also prevent BREAK on the serial port
from working, and 2) it probably wouldn't help to be able to trigger
ddb anyway, because ddb output will go to the system console, not the
console where ddb.trigger=1 was used.

> So you might need to set kern.securelevel to lower value ("sysctl 
> kern.securelevel=-1"
> in /etc/rc.securelevel), or make your console on serial (with "set tty com0" 
> on
> bootloader).

If 'set tty comX' isn't already used, the answer is almost certainly to
set that.

Reply via email to