re: how do I preset ddb's LINES to zero

2023-12-16 Thread matthew green
> > try "options DB_MAX_LINE=0" in your kernel?
>
> Right.  Unfortunately that fails the "without having to rebuild the
> kernel" requirement :-)

another option would be to use say, gdb :-), to change the value of
the "db_max_line" variable from default of 24 to 0, and then boot
that modified kernel... if you find the boot to ddb is problematic.


Re: how do I preset ddb's LINES to zero

2023-12-16 Thread Andrew Cagney
On Fri, 15 Dec 2023 at 22:59, matthew green  wrote:
>
> Andrew Cagney writes:
> > > > thanks, I'll add that (it won't help with my immediate problem of a
> > > > panic during boot though)
> > >
> > > From DDB command prompt "set $lines = 0" ...
> >
> > Um, the test framework's VM is stuck waiting for someone to hit the
> > space bar :-)
> >
> > I guess I could modify my pexpect script to do just that, but I was
> > kind of hoping I could do something like add ddb.lines=0 to the boot
> > line.
>
> try "options DB_MAX_LINE=0" in your kernel?

Right.  Unfortunately that fails the "without having to rebuild the
kernel" requirement :-)

> we have poor boot-command line support if you compare against
> say what linux can do.

booting directly to ddb is sufficient for my needs.
thanks


Re: how do I preset ddb's LINES to zero

2023-12-15 Thread tlaronde
On Sat, Dec 16, 2023 at 02:58:59PM +1100, matthew green wrote:
> Andrew Cagney writes:
> > > > thanks, I'll add that (it won't help with my immediate problem of a
> > > > panic during boot though)
> > >
> > > From DDB command prompt "set $lines = 0" ...
> >
> > Um, the test framework's VM is stuck waiting for someone to hit the
> > space bar :-)
> >
> > I guess I could modify my pexpect script to do just that, but I was
> > kind of hoping I could do something like add ddb.lines=0 to the boot
> > line.
> 
> try "options DB_MAX_LINE=0" in your kernel?
> 
> we have poor boot-command line support if you compare against
> say what linux can do.
> 

I have added to userconf(4) (this has not been merged in NetBSD) support for 
"aliases"
(variables that can be macros), and patterns etc. Support has been added to 
config(1)
to generate "commands" to interpret by userconf(1) at start-up time
(userconf(4) interprets whatever has been added by config(1); then
whatever is passed by the bootloader; and then perhaps, enters an
interactive session if the -c flag was given; what is added via
config(1) is always interpreted).

It wouldn't be difficult to add in userconf(4) a command to set such parameters,
with then the possibility to add, at user will, "commands" to be
interpreted at start-up time via config(1); or passed by the bootloader; or 
written
in userconf(4) interactive session.

userconf(4), M.I., is the correct place to add these. And the majority
of the work has already been done to allow such extensions (see
https://github.com/tlaronde/BeSiDe for the code).
-- 
Thierry Laronde 
 http://www.kergis.com/
http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


re: how do I preset ddb's LINES to zero

2023-12-15 Thread matthew green
Andrew Cagney writes:
> > > thanks, I'll add that (it won't help with my immediate problem of a
> > > panic during boot though)
> >
> > From DDB command prompt "set $lines = 0" ...
>
> Um, the test framework's VM is stuck waiting for someone to hit the
> space bar :-)
>
> I guess I could modify my pexpect script to do just that, but I was
> kind of hoping I could do something like add ddb.lines=0 to the boot
> line.

try "options DB_MAX_LINE=0" in your kernel?

we have poor boot-command line support if you compare against
say what linux can do.


.mrg.


Re: how do I preset ddb's LINES to zero

2023-12-15 Thread Valery Ushakov
On Fri, Dec 15, 2023 at 11:19:39 -0500, Andrew Cagney wrote:

> I've the stock 10.0 boot.iso booting within a KVM based test
> framework.  I'd like to set things up so that should there be a panic,
> it dumps registers et.al., without stopping half way waiting for
> someone to hit the space bar vis:
> 
> r9  af80b451d080
> r10 81d9a063
> r11 0
> r12 0
> --db_more--
> 
> Is there a way to stop this without having to rebuild the kernel.

If the kernel is already there, you can't avoid that prompt without
*some* interaction.  I don't think you can tweak this from boot.cfg

There's probably no good default for db_more prompt, as there are
situations where someone wants it on and someone off.  May be we
should make that into a boot argument, so that if a script talks to
the console, it can issue the corresponding boot command at a well
defined time instead of doing expect-like things?  Or may be force the
paging off for db_cmd_on_enter.

PS: xen console seems to forcibly override db_max_line to avoid paging
prompt.

-uwe


Re: how do I preset ddb's LINES to zero

2023-12-15 Thread Andrew Cagney
> > thanks, I'll add that (it won't help with my immediate problem of a
> > panic during boot though)
>
> From DDB command prompt "set $lines = 0" ...

Um, the test framework's VM is stuck waiting for someone to hit the
space bar :-)

I guess I could modify my pexpect script to do just that, but I was
kind of hoping I could do something like add ddb.lines=0 to the boot
line.


Re: how do I preset ddb's LINES to zero

2023-12-15 Thread J. Hannken-Illjes
> On 15. Dec 2023, at 19:44, Andrew Cagney  wrote:
> 
> On Fri, 15 Dec 2023 at 11:22, J. Hannken-Illjes  wrote:
> 
>>> Is there a way to stop this without having to rebuild the kernel.
>> 
>> sysctl -w ddb.lines=0
> 
> thanks, I'll add that (it won't help with my immediate problem of a
> panic during boot though)

From DDB command prompt "set $lines = 0" ...

--
J. Hannken-Illjes - hann...@mailbox.org

Re: how do I preset ddb's LINES to zero

2023-12-15 Thread Andrew Cagney
On Fri, 15 Dec 2023 at 11:22, J. Hannken-Illjes  wrote:

> > Is there a way to stop this without having to rebuild the kernel.
>
> sysctl -w ddb.lines=0

thanks, I'll add that (it won't help with my immediate problem of a
panic during boot though)


Re: how do I preset ddb's LINES to zero

2023-12-15 Thread J. Hannken-Illjes
> On 15. Dec 2023, at 17:19, Andrew Cagney  wrote:
> 
> Hi,
> 
> I've the stock 10.0 boot.iso booting within a KVM based test
> framework.  I'd like to set things up so that should there be a panic,
> it dumps registers et.al., without stopping half way waiting for
> someone to hit the space bar vis:
> 
> r9  af80b451d080
> r10 81d9a063
> r11 0
> r12 0
> --db_more--
> 
> Is there a way to stop this without having to rebuild the kernel.

sysctl -w ddb.lines=0

--
J. Hannken-Illjes - hann...@mailbox.org