tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lua kernel library?



On 16 June 2015 at 13:52, Lourival Vieira Neto <lourival.neto%gmail.com@localhost> wrote:
> Hi Andrew,
>
>> Is the kernel's version of Lua available as a library?
>
> You can use it as a regular kernel module. Take a look at this patch
> [1] which adds Lua to NPF, as an example.

thanks, I'd looked briefly at the lua et.al. modules.

> [1] http://www.netbsd.org/~lneto/pending/0005-added-npf_ext_lua.patch
>
>> (...)
>> to sys/ddb/files.ddb is not the best way to link Lua into DDB
>

My understanding of this general approach is that it would make DDB
dependent on a [possibly loadable] kernel module?  Or perhaps I can
add a "lua" pseudo device and start calling the underlying library
directly?

To me an in-kernel debugger needs to be both largely standalone and
callable from every very early in the boot process.  For instance,
just after the serial console's initialized and showing signs of
working.

(This is also why I need to change my hack so that it uses a static
buffer for Lua's heap; using the kernel to allocate memory when
debugging the kernel's memory allocator doesn't tend to work very well
:-)

> What's your plan for DDB+Lua? =)

literally, to see what happens when you put lua and dwarf in a kernel
(see BSDCan)

> Regards,
> --
> Lourival Vieira Neto


Home | Main Index | Thread Index | Old Index