Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-21 Thread Dmitry V. Levin
On Wed, Jun 21, 2017 at 08:51:24PM +0300, Victor Krapivensky wrote: > On Tue, Jun 20, 2017 at 04:23:11AM +0300, Dmitry V. Levin wrote: > > I don't mind some preprocessor magic as well as a prefix, but FFI_ prefix > > looks quite specific > > Could you please elaborate? What do you mean by "specifi

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-21 Thread Victor Krapivensky
On Tue, Jun 20, 2017 at 04:23:11AM +0300, Dmitry V. Levin wrote: > I don't mind some preprocessor magic as well as a prefix, but FFI_ prefix > looks quite specific Could you please elaborate? What do you mean by "specific"? > while different parts of strace could benefit from > uniformly named ST

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-19 Thread Dmitry V. Levin
On Mon, Jun 19, 2017 at 02:55:43AM +0300, Victor Krapivensky wrote: > On Mon, Jun 19, 2017 at 12:36:41AM +0300, Dmitry V. Levin wrote: > > Do we need so many different stringify macros? > > Could we harmonize them somehow? > > Well, we can't just place them into defs.h because sysent.h, but not >

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-18 Thread Victor Krapivensky
On Mon, Jun 19, 2017 at 12:36:41AM +0300, Dmitry V. Levin wrote: > Do we need so many different stringify macros? > Could we harmonize them somehow? Well, we can't just place them into defs.h because sysent.h, but not defs.h, is included by some tests/ files. We could move all the STRINGIFY/#ifde

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-18 Thread Dmitry V. Levin
On Sun, Jun 18, 2017 at 03:35:01PM +0300, Victor Krapivensky wrote: > On Fri, Jun 16, 2017 at 02:46:22PM +, Eugene Syromyatnikov wrote: > > Well, I don't consider having a commonly used stringification macro a > > namespace pollution. > > But that's exactly what's happened -- I chose a name wi

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-18 Thread Victor Krapivensky
On Fri, Jun 16, 2017 at 02:46:22PM +, Eugene Syromyatnikov wrote: > Well, I don't consider having a commonly used stringification macro a > namespace pollution. But that's exactly what's happened -- I chose a name without prefix, #undef'd it at the end of the header, and relied on that it woul

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-16 Thread Dmitry V. Levin
On Fri, Jun 16, 2017 at 05:39:01PM +0300, Victor Krapivensky wrote: > On Thu, Jun 15, 2017 at 05:39:25PM +, Eugene Syromyatnikov wrote: > > On Thu, Jun 15, 2017 at 3:28 PM, Eugene Syromiatnikov > > wrote: > > > Overall looks good. > > > > Well, except that mpers_defs.h also has STRINGIFY() m

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-16 Thread Eugene Syromyatnikov
On Fri, Jun 16, 2017 at 2:39 PM, Victor Krapivensky wrote: > On Thu, Jun 15, 2017 at 05:39:25PM +, Eugene Syromyatnikov wrote: >> On Thu, Jun 15, 2017 at 3:28 PM, Eugene Syromiatnikov >> wrote: >> > Overall looks good. >> >> Well, except that mpers_defs.h also has STRINGIFY() macro and >> un

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-16 Thread Victor Krapivensky
On Thu, Jun 15, 2017 at 05:39:25PM +, Eugene Syromyatnikov wrote: > On Thu, Jun 15, 2017 at 3:28 PM, Eugene Syromiatnikov wrote: > > Overall looks good. > > Well, except that mpers_defs.h also has STRINGIFY() macro and > undef'ing it in defs_reuse.h leads to breaking of mpers header > generat

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-16 Thread Victor Krapivensky
On Thu, Jun 15, 2017 at 05:28:53PM +0200, Eugene Syromiatnikov wrote: > Do you really consider multiple -l arguments in a command line an error > incompatible with continuation of strace execution? Well, yes. We don't support multiple scripts, and specifying multiple -l arguments is a usage error.

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-15 Thread Eugene Syromyatnikov
On Thu, Jun 15, 2017 at 3:28 PM, Eugene Syromiatnikov wrote: > Overall looks good. Well, except that mpers_defs.h also has STRINGIFY() macro and undef'ing it in defs_reuse.h leads to breaking of mpers header generation and breaking of the (clean) build, as a result. I'd suggest renaming STRINGIFY

Re: [PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-15 Thread Eugene Syromiatnikov
On Sat, Jun 10, 2017 at 11:17:29PM +0300, Victor Krapivensky wrote: > * Makefile.am: Build with LuaJIT if configured so. > (strace_SOURCES): Add defs_reuse.h. > * configure.ac: Add new --with-luajit configure option. > * defs.h: Move code that needs to be fed to LuaJIT's FFI to... > * defs_reuse.h:

[PATCH RFC v1 1/1] Initial support for Lua scripting

2017-06-10 Thread Victor Krapivensky
* Makefile.am: Build with LuaJIT if configured so. (strace_SOURCES): Add defs_reuse.h. * configure.ac: Add new --with-luajit configure option. * defs.h: Move code that needs to be fed to LuaJIT's FFI to... * defs_reuse.h: ...new file. * strace.c: Initial support for Lua scripting. (init): New -l op