<HTML><BODY><div>Hi!</div><div>Thanks for the fix!</div><div>LGTM</div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Best regards,</div><div>Maxim Kokryashkin</div></div></div><div> </div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16914066650087769119_BODY">Max,<br><br>Thanks for your review! For me it's totally the same (you can see I use<br>the term 'coro' in the comments right there), but I don't mind your<br>naming, so fixed. Here is the diff:<br><br>================================================================================<br><br>diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py<br>index 2e0b145b..9075e99f 100644<br>--- a/src/luajit-gdb.py<br>+++ b/src/luajit-gdb.py<br>@@ -233,15 +233,15 @@ def L(L=None):<br>     # lookup a symbol for the main coroutine considering the host app<br>     # XXX Fragile: though the loop initialization looks like a crap but it<br>     # respects both Python 2 and Python 3.<br>- for coroutine in [L] + list(map(lambda main: lookup(main), (<br>+ for lstate in [L] + list(map(lambda main: lookup(main), (<br>         # LuaJIT main coro (see luajit/src/luajit.c)<br>         'globalL',<br>         # Tarantool main coro (see tarantool/src/lua/init.h)<br>         'tarantool_L',<br>         # TODO: Add more<br>     ))):<br>- if coroutine:<br>- return cast('lua_State *', coroutine)<br>+ if lstate:<br>+ return cast('lua_State *', lstate)<br> <br> <br> def G(L):<br>diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py<br>index 76fb3141..85c0dcb9 100644<br>--- a/src/luajit_lldb.py<br>+++ b/src/luajit_lldb.py<br>@@ -453,15 +453,15 @@ def L(L=None):<br>     # lookup a symbol for the main coroutine considering the host app<br>     # XXX Fragile: though the loop initialization looks like a crap but it<br>     # respects both Python 2 and Python 3.<br>- for coroutine in [L] + list(map(lambda main: lookup_global(main), (<br>+ for lstate in [L] + list(map(lambda main: lookup_global(main), (<br>         # LuaJIT main coro (see luajit/src/luajit.c)<br>         'globalL',<br>         # Tarantool main coro (see tarantool/src/lua/init.h)<br>         'tarantool_L',<br>         # TODO: Add more<br>     ))):<br>- if coroutine:<br>- return lua_State(coroutine)<br>+ if lstate:<br>+ return lua_State(lstate)<br> <br> <br> def tou32(val):<br>@@ -1066,9 +1066,9 @@ coroutine guest stack:<br> If L is ommited the main coroutine is used.<br>     '''<br>     def execute(self, debugger, args, result):<br>- coro = self.parse(args)<br>- coro_ptr = cast('lua_State *', coro) if coro is not None else None<br>- print('{}'.format(dump_stack(L(coro_ptr))))<br>+ lstate = self.parse(args)<br>+ lstate_ptr = cast('lua_State *', lstate) if coro is not None else None<br>+ print('{}'.format(dump_stack(L(lstate_ptr))))<br> <br> <br> def register_commands(debugger, commands):<br><br>================================================================================<br><br>On 03.08.23, Maxim Kokryashkin wrote:<br>><br>> Hi, Igor!<br>> Thanks for the patch!<br>> I don’t think `coroutine` is a great name.`lua_state` seems<br>> to be a better option here.<br>> --<br>> Best regards,<br>> Maxim Kokryashkin<br>>  <br>>  <br><br><snipped><br><br>>  <br><br>--<br>Best regards,<br>IM</div></div></div></div></blockquote><div> </div></div></blockquote></BODY></HTML>