From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9AB506EC40; Tue, 17 Aug 2021 12:48:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9AB506EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629193693; bh=xblhNdEIn+W32KbZ794j9fTATwAEe7LENNZYfXBXl60=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qClB0dmclBgV7o2lKxsHsaXwRh8Lh3+EfTNZxqEjm8r+pUY75SzzXFxMxd1vIXIcU mUEA7QipW/v1pXuIF8mTA4nv7qBox/PuyPNO1jIvuFzpe12XR1CYNp3GjcLisvmnIF pPejMqSneltzrE8i3jZdcJmxk7kfuDRuYToTpUAk= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F41646EC40 for ; Tue, 17 Aug 2021 12:48:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F41646EC40 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mFvha-0003iH-V9; Tue, 17 Aug 2021 12:48:11 +0300 Date: Tue, 17 Aug 2021 12:23:01 +0300 To: Maxim Kokryashkin Message-ID: <20210817092301.GD5743@tarantool.org> References: <20210731133648.25660-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210731133648.25660-1-m.kokryashkin@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD906AB4890CDABF0C5CB76CEE71D3E4007182A05F5380850406DA3331C211112C7742933464B29A5DDA95DBEB30FE248C98E61F6FC252C2140 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D9C4478D0B876341EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373768BF035B57E5168638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D892FD09E9540C2D1C60E9474EF8985C9D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6BF3059D42242344A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505C27E50F4BACCB30F35ACDBBD8262BEBC X-C1DE0DAB: 0D63561A33F958A547A4BA0A036829456BF98CE6631B3560AF6F551FDBA70AB4D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7567C209D01CC1E34B410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3490011A262ADAEDFEA6C436B7E5069DC8208A3E47CF7ED9BBD86AFE34D8117D3558C61AE35F663BEA1D7E09C32AA3244C63BC5B31024F45889E7F86FF4F8D76875595C85A795C7BAE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojIrFL/N5KnVHiqbg6eNdMKw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D2CD699662786BA8B9068E9CD4D2C61A4A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] luajit-gdb: support dualnum mode X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Max, I've checked the patch into all long-term branches in tarantool/luajit and bumped a new version in 1.10, 2.7, 2.8 and master. On 31.07.21, Maxim Kokryashkin wrote: > For x86/x64 LJ_DUALNUM mode is disabled. But for some other arches > (arm or arm64, for example) it is enabled by default. luajit-gdb.py > displays integers in LJ_DUALNUM mode as nan-s. > > As it turned out, luajit-gdb detects those integers as integers, but > there was a problem with the dumper function itself. The dumper > function produces output thinking of any input value as of a double. > However, in DUALNUM mode, integers and floats are stored differently, > so the `itype` of a float number 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. > > But in any mode, lua numbers are stored as doubles on the C side, so it > takes an ugly cast chain on the Python side to perform the some sort of > the `reinterpret_cast` because the gdb module doesn't have any > mechanism to get the address of a symbol. > > Closes tarantool/tarantool#6224 > --- > Github branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-6224-support-dulanum > Issue: https://github.com/tarantool/tarantool/issues/6224 > For more info, see line 273 in lj_obj.h > > src/luajit-gdb.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > -- > 2.32.0 > -- Best regards, IM