Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-06 Thread Victor Krapivensky
On Wed, Jul 05, 2017 at 06:17:59PM +0300, Dmitry V. Levin wrote: > On Wed, Jul 05, 2017 at 05:28:53PM +0300, Victor Krapivensky wrote: > > On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote: > > > This longish C string is actually a lua script, and it doesn't look nice > > > in this fo

Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-05 Thread Dmitry V. Levin
On Wed, Jul 05, 2017 at 05:28:53PM +0300, Victor Krapivensky wrote: > On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote: > > This longish C string is actually a lua script, and it doesn't look nice > > in this form. Wouldn't it be better if this script was translated into > > a C str

Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-05 Thread Victor Krapivensky
On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote: > This longish C string is actually a lua script, and it doesn't look nice > in this form. Wouldn't it be better if this script was translated into > a C string automatically by some Makefile rule? Yes, it would. In fact, this is wha

Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-04 Thread Dmitry V. Levin
On Tue, Jul 04, 2017 at 01:25:23PM +0300, Victor Krapivensky wrote: [...] > diff --git a/luajit_lib.h b/luajit_lib.h > new file mode 100644 > index ..16e49610 > --- /dev/null > +++ b/luajit_lib.h > @@ -0,0 +1,260 @@ > +"do\n\ > + local ffi = require(strace._ffilibname)\n\ > + local

[PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-04 Thread Victor Krapivensky
* Makefile.am: Build with LuaJIT if configured so. (strace_SOURCES): Add defs_shared.h, ffi.h. * configure.ac: Add new --with-luajit configure option. * defs.h (TCB_AD_HOC_INJECT): new TCB flag. (QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags. (struct tcb): If built with LuaJIT support, include c

[PATCH v5 1/1] Initial support for LuaJIT scripting

2017-06-27 Thread Victor Krapivensky
* Makefile.am: Build with LuaJIT if configured so. (strace_SOURCES): Add defs_shared.h, ffi.h. * configure.ac: Add new --with-luajit configure option. * defs.h (TCB_AD_HOC_INJECT): new TCB flag. (QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags. (struct tcb): If built with LuaJIT support, include c