[Tarantool-patches] [PATCH luajit 2/4] dbg: fix DUALNUM detection for LLDB

Sergey Kaplun skaplun at tarantool.org
Fri Jun 5 19:01:50 MSK 2026


Hi, Sergey!
Thanks for the review!
Added the separate commit as you suggested.
Branch is force-pushed.

On 05.06.26, Sergey Bronnikov wrote:
> Hi, Sergey,
> 
> thanks for the patch! LGTM with a minor comment below.
> 
> Sergey
> 
> On 6/4/26 12:30, Sergey Kaplun wrote:
> > The `lj-arch` command on LLDB reports 'LJ_DUALNUM: True' for the
> > single-number build since the `module.FindSymbol()` returns an invalid
> > `SBSymbol` object [1], which is not `None`. This leads to invalid
> > DUALNUM mode detection.
> >
> > This patch fixes this by checking that the returned symbol is valid.
> >
> > [1]:https://lldb.llvm.org/python_api/lldb.SBModule.html#lldb.SBModule.FindSymbol
> > ---
> >   src/luajit_dbg.py                                 |  3 ++-
> >   .../debug-extension-tests.py                      | 15 +++++++++++++--
> >   2 files changed, 15 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py
> > index 410f0191..300d65e9 100644
> > --- a/src/luajit_dbg.py
> > +++ b/src/luajit_dbg.py
> 
> I believe DUALNUM should be added to the help for `lj-arch`. Now it 
> describes only LJ_64, LJ_GC64:

I've added the separate commit for it. I'll send the patch in the reply
to the main thread.

===================================================================
dbg: update help for the lj-arch command

This patch adds the description of the LJ_DUALNUM dumped flag to the
lj-arch command's help.

diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py
index 60308179..3a3ca9b8 100644
--- a/src/luajit_dbg.py
+++ b/src/luajit_dbg.py
@@ -1461,7 +1461,8 @@ lj-arch
 
 The command requires no args and dumps values of LJ_64 and LJ_GC64
 compile-time flags. These values define the sizes of host and GC
-pointers, respectively.
+pointers, respectively. Also, it dumps the value for the LJ_DUALNUM
+compile-time flag to inspect if LuaJIT is built in dual-number mode.
     '''
 
     def execute(self, arg):
===================================================================

<snipped>

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list