[Tarantool-patches] [PATCH luajit v2] luajit-gdb: support dualnum mode

Igor Munkin imun at tarantool.org
Tue Aug 17 10:47:41 MSK 2021


Max,

Thanks for the fixes! LGTM now. BTW, I've reverted one fix proposed by
Sergey (see the corresponding thread) and fixed a typo below.

On 16.08.21, Максим Корякшин wrote:
> 
> Hello, Igor!
> Thanks for your comments!
>  
> Here is the new commit message:
> =========================================================
> gdb: support LJ_DUALNUM mode
>  
> luajit-gdb.py displays integers in LJ_DUALNUM mode as nan-s. The
> dumper function produces output considering any input value as a
> double. However, in LJ_DUALNUM mode, integers and doubles are stored
> differently, so the `itype` of a double must be less than
> `LJ_TISNUM`, and the `itype` of an integer must be `LJ_TISNUM`. With
> this fact in mind, we can easily differentiate one from another.
>  
> Closes tarantool/tarantool#6224
> =========================================================
>  
> Here is the diff:
> =========================================================
> diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
> index 9ccca66a..25428745 100644
> --- a/src/luajit-gdb.py
> +++ b/src/luajit-gdb.py
> @@ -507,10 +507,14 @@ pointers respectively.
>      '''
>      def invoke(self, arg, from_tty):
> -        gdb.write('LJ_64: {LJ_64}, LJ_GC64: {LJ_GC64}\n'.format(
> -            LJ_64 = LJ_64,
> -            LJ_GC64 = LJ_GC64
> -        ))
> +        gdb.write(
> +            'LJ_64: {LJ_64}, LJ_GC64: {LJ_GC64}, LJ_DUALNUM : {LJ_DUALNUM}\n'

Side note: Excess whitespace. I've fixed this before merging the patch
into the trunk.

> +            .format(
> +                LJ_64 = LJ_64,
> +                LJ_GC64 = LJ_GC64,
> +                LJ_DUALNUM = LJ_DUALNUM
> +            )
> +        )
>  class LJDumpTValue(LJBase):
>      '''

<snipped>

> =========================================================
>  
>
<snipped>

> >Best regards,
> >Maxim Kokryashkin
>
-- 
Best regards,
IM


More information about the Tarantool-patches mailing list