From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump
Date: Tue, 30 Jun 2026 17:03:56 +0300 [thread overview]
Message-ID: <akPMzIYWLA_46_Z0@root> (raw)
In-Reply-To: <1782824841.356858129@f727.i.mail.ru>
Evgeniy,
On 30.06.26, Evgeniy Temirgaleev wrote:
> Sergey, thanks for the answer!
>
> > I'm not sure that ctype_preplit -> dump_ctype_preplit helps for find the
> > original logic for this dumper from the LuaJIT source code. So, I'm open
> > to ideas ;).
>
> I think, we can use original names from LuaJIT(ctype_prelit for ctype_prelit) and differ names for routines which are not present in LuaJIT. No more ideas at a time :)
>
> I can’t find cdata_val_int64 or cdata_val_complex in LuaJIT code, ‘dump_’ prefix missed?
They are partially inspired by __tostring metamethod for FFI.
Added the prefix as you suggested:
===================================================================
diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py
index 28cbe97d..19cefaed 100644
--- a/src/luajit_dbg.py
+++ b/src/luajit_dbg.py
@@ -2081,9 +2081,9 @@ def dump_lj_gco_cdata(gcobj):
size = ctype['size']
value = ''
if ctype_iscomplex(info):
- value = cdata_val_complex(cdata, ctype)
+ value = dump_cdata_val_complex(cdata, ctype)
elif size == 8 and ctype_isinteger(info):
- value = cdata_val_int64(cdata, ctype)
+ value = dump_cdata_val_int64(cdata, ctype)
else:
value = cdataptr(cdata)
if ctype_isptr(info):
@@ -2425,7 +2425,7 @@ def dump_func(func):
# FFI dumpers.
-def cdata_val_int64(cdata, ctype):
+def dump_cdata_val_int64(cdata, ctype):
info = ctype['info']
isunsigned = info & CTF_UNSIGNED
cdataval = cdataptr(cdata)
@@ -2439,7 +2439,7 @@ def cdata_val_int64(cdata, ctype):
return str(valueptr[0]) + usuffix + 'LL'
-def cdata_val_complex(cdata, ctype):
+def dump_cdata_val_complex(cdata, ctype):
size = ctype['size']
cdataval = cdataptr(cdata)
casttype = None
===================================================================
Branch is force-pushed.
>
> --
> Best regards,
> Evgeniy Temirgaleev
>
> >
> > From: Sergey Kaplun <skaplun@tarantool.org>
> > To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> > Cc: tarantool-patches@dev.tarantool.org, Sergey Bronnikov <sergeyb@tarantool.org
> > >
> > Date: Tuesday, June 30, 2026 3:27 PM +03:00
> > Evgeniy,
> > Thanks for the answer, see my thoughts below.
> >
> > On 30.06.26, Evgeniy Temirgaleev wrote:
<snipped>
> > --
> > Best regards,
> > Sergey Kaplun
> >
--
Best regards,
Sergey Kaplun
next prev parent reply other threads:[~2026-06-30 14:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 20:29 [Tarantool-patches] [PATCH luajit 0/3] Extend debug extension Sergey Kaplun via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 1/3] dbg: introduce lj-ir, lj-jslots, lj-trace dumpers Sergey Kaplun via Tarantool-patches
2026-06-28 1:03 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-28 16:32 ` Sergey Kaplun via Tarantool-patches
2026-06-29 16:35 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:45 ` Sergey Bronnikov via Tarantool-patches
2026-06-30 16:01 ` Sergey Kaplun via Tarantool-patches
2026-07-01 11:23 ` Sergey Bronnikov via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump Sergey Kaplun via Tarantool-patches
2026-06-29 13:55 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-29 19:20 ` Sergey Kaplun via Tarantool-patches
2026-06-30 11:48 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 12:27 ` Sergey Kaplun via Tarantool-patches
2026-06-30 13:07 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:03 ` Sergey Kaplun via Tarantool-patches [this message]
2026-06-30 15:07 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:53 ` Sergey Bronnikov via Tarantool-patches
2026-06-30 15:03 ` Sergey Kaplun via Tarantool-patches
2026-07-01 8:25 ` Sergey Kaplun via Tarantool-patches
2026-07-01 11:20 ` Sergey Bronnikov via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 3/3] test: add verbose mode for debug extension tests Sergey Kaplun via Tarantool-patches
2026-06-28 1:31 ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-28 15:19 ` Sergey Kaplun via Tarantool-patches
2026-06-30 14:54 ` Sergey Bronnikov via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akPMzIYWLA_46_Z0@root \
--to=tarantool-patches@dev.tarantool.org \
--cc=e.temirgaleev@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox