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 F182A6EC40; Mon, 5 Jul 2021 10:29:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F182A6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1625470200; bh=l2JvTQQPwV9rz2crhzIpoolNCQ4FCMV01B7ary1vCjI=; 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=pfmnTEj9xXSZIuuaTKjXJixVhzBTOw5G5rz3/bZFbJBt69ujCj2rd1uQfnwb5+OsO JMoy6aiJwsRl/GG9rCE4JscQCCQ9OxBRVsyZn5UDINNvUQ47ZmCivVCY7wEa7uFgGw Me44vvI7KGVwCP6u/yldgSdKOyst9QPVkpbqtUe4= Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 1A1796EC40 for ; Mon, 5 Jul 2021 10:29:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1A1796EC40 Received: by smtp52.i.mail.ru with esmtpa (envelope-from ) id 1m0J3G-0007aD-2w; Mon, 05 Jul 2021 10:29:58 +0300 Date: Mon, 5 Jul 2021 10:28:52 +0300 To: Mikhail Shishatskiy Message-ID: References: <20210630142020.326411-1-m.shishatskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210630142020.326411-1-m.shishatskiy@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD954DFF1DC42D673FB0C620705B15DE32DFE392EA95FA71EAB182A05F53808504025931B0CB8DE28C701094C3B951318E8E0DDD655C71B4291E714801C02E635E8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DB7B102DCB413779EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CE3A619BB4CB99268638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D88C4DFADB86F6FF9F361C21D0EE01309E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A59C1FAB0507BB12A1D221A62B038CC1B8B23113ECA96ACED5D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7569E77FCA7B33833F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D2AC226BFD455724D8716E35C40A2AC458F0EBBB5D6AFFCE21B8FE59174ED87998E885AB37765A521D7E09C32AA3244C27972CB92C35F9C22D7898E772D7885BE8FBBEFAE1C4874CFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj5fH2RN9TpJlEOLqMrxhKwA== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB40BAEE725089D1AF4F4DA7E70167612228735D1064880384AF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] luajit-gdb: fix misalignment in lj-stack 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! LGTM, except several nits to the commit message. On 30.06.21, Mikhail Shishatskiy wrote: | luajit-gdb: fix misalignment in lj-stack Please use just | gdb: fix misalignment in lj-stack for LJ_GC64 "tag" (you can check all tags types in the git log). > When LJ_GC64 was enabled, the alignment of stack slots printed by > lj-stack command failed. It looked like the following: Nit: I suggest reformulate it like the following: | When LJ_GC64 is enabled, stack slots printed by lj-stack command | are misaligned. > > | 0x7ffff7fb0d90:0x7ffff7fb0dc0 [ ] 7 slots: Red zone > | 0x7ffff7fb0d88 [ M] > | 0x7ffff7fb0cc0:0x7ffff7fb0d80 [ ] 25 slots: Free stack slots > | 0x7ffff7fb0cb8 [ T ] Nit: please describe the reason of this issue > > This patch fixes the output to look as expected: Nit: by how? > > | 0x7ffff7fb0d90:0x7ffff7fb0dc0 [ ] 7 slots: Red zone > | 0x7ffff7fb0d88 [ M] > | 0x7ffff7fb0cc0:0x7ffff7fb0d80 [ ] 25 slots: Free stack slots > | 0x7ffff7fb0cb8 [ T ] > > To test changes do the following: > > | $ gdb -q --args ./luajit -e 'print("QQ")' > | Reading symbols from ./luajit... > | lj-arch command initialized > | lj-tv command initialized > | lj-str command initialized > | lj-tab command initialized > | lj-stack command initialized > | lj-state command initialized > | lj-gc command initialized > | luajit-gdb.py is successfully loaded > | (gdb) lj-arch > | LJ_64: True, LJ_GC64: True > | (gdb) b lj_cf_print > | Breakpoint 1 at 0x298b0: file /mnt/WorkDisk/share/dev/__tarantool/lj-tarantool/src/lib_base.c, line 485. > | (gdb) r > | Starting program: /mnt/WorkDisk/share/dev/__tarantool/lj-tarantool/src/luajit -e print\(\"QQ\"\) > | > | Breakpoint 1, lj_cf_print (L=0x0) > | at /mnt/WorkDisk/share/dev/__tarantool/lj-tarantool/src/lib_base.c:485 > | 485 { > | (gdb) s > | 486 ptrdiff_t i, nargs = L->top - L->base; > | (gdb) lj-stack L > | 0x7ffff7fa8d90:0x7ffff7fa8dc0 [ ] 7 slots: Red zone > | 0x7ffff7fa8d88 [ M] > | 0x7ffff7fa8cc0:0x7ffff7fa8d80 [ ] 25 slots: Free stack slots > | 0x7ffff7fa8cb8 [ T ] > | 0x7ffff7fa8cb0 [ B ] VALUE: string "QQ" @ 0x7ffff7fb1178 > | 0x7ffff7fa8ca0:0x7ffff7fa8ca8 [ ] FRAME: [L] delta=2, fast function #29 > | 0x7ffff7fa8c90:0x7ffff7fa8c98 [ ] FRAME: [V] delta=2, Lua function @ 0x7ffff7fb1240, 0 upvalues, "=(command line)":0 > | 0x7ffff7fa8c80:0x7ffff7fa8c88 [ ] FRAME: [CP] delta=4, Lua function @ 0x7ffff7fb1240, 0 upvalues, "=(command line)":0 > | 0x7ffff7fa8c78 [ ] VALUE: C function @ 0x55555555c962 > | 0x7ffff7fa8c70 [ ] VALUE: light userdata @ 0x0 > | 0x7ffff7fa8c60:0x7ffff7fa8c68 [ ] FRAME: [CP] delta=2, C function @ 0x55555555df1c > | 0x7ffff7fa8c58:0x7ffff7fa8c60 [S ] FRAME: dummy L Thanks for the test case! Please delete it from commit message (it's redundant there, I suppose). You can mention it in the mail itself after "---" before the diff entry [*] (see below). > > Fixes: tarantool/tarantool#5876 > > Branch: https://github.com/tarantool/luajit/tree/shishqa/gh-5876 This too [*] (especially it is not a part of the commit message). > > --- <<< [*] Exactly here. > src/luajit-gdb.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py > index f1fd6230..720d989a 100644 > --- a/src/luajit-gdb.py > +++ b/src/luajit-gdb.py > -- > 2.32.0 > -- Best regards, Sergey Kaplun