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 0E8015802E8; Mon, 7 Aug 2023 16:55:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0E8015802E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691416536; bh=6+yamki6j0x3Kv7xY46boNvhNb54LS1A8fyfPM1Oqeg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fA66gQMkWvfh5+pESWWJ2HZfcqcKeF2ZZGGdZAOY8AQLTyM+kiTE5CveuaodSLMZt TW+zPtSGsdrXkACz9DGwrlq/JjAckBm5uzRuAcI9bKkt/vBCoLN7HmzzTpIYb7SmIG G0RUn1kDjmj/vbxkmSTxXoUBNGkDQRQe1oQHotcA= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [95.163.41.79]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B496D5802E8 for ; Mon, 7 Aug 2023 16:55:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B496D5802E8 Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1qT0hp-002763-1b; Mon, 07 Aug 2023 16:55:33 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Mon, 7 Aug 2023 13:41:43 +0000 Message-Id: <28b65ad39a0b6bd484e26e8baf9fd81979a267fa.1691415376.git.imun@tarantool.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC86EE92E42F0C271DDDF6A6B73F41FC074182A05F5380850406745BDB957429C87079AAFF4EF0126DB374694ECFE2D7D57634B3BC755C0508F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AB524098FB2F2222EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A361B53D384D9D40EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA7B67A4FEEDE9C1BFB92C83AAAD5797C9CC7F00164DA146DAFE8445B8C89999728AA50765F7900637D9CFB327BC390E24389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC810A7BA5215B3CCECF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C68E4D7E803FA7AD503F1AB874ED890284AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3153EF4665D288B94BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7D699F3A2029486C7731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A54F94B6B11668D338577EAAD448A00C342617059427D3AE22F87CCE6106E1FC07E67D4AC08A07B9B0251EFD5447B32ED69C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF8EAE721C62CB8DD7D08B5F1C30AAD6F27D8FC843AC148B8B70D6B715EF4F22496238D603D2F19CCF1529AA6C8ABD04CA24669801905D9617ECC5A4D88893646CA74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXgfSui1JlMs/3GkkzRvWM5A X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D53124449DAE3F87FDEDC90BA56C5483E7723B00933005611BEF2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 16/15] gdb: fix Python statement usage 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" This misuse was introduced in the initial implementation of GDB extension within the commit 58790750b9c4bd4c21d883f109ab552a2e202a15 ("gdb: introduce luajit-gdb extension") and also propagated to the initial implementation of LLDB extension by copy-pasting in scope of the commit 62fc84a8f89b8e5650162ba1c7696b0f84cf5c25 ("lldb: introduce luajit-lldb"). However, is not a function, but statement, so parenthesis around the condition are considered as a tuple constructor. This patch simply removes the excess parenthesis to finally follow Python semantics of the statement. Signed-off-by: Igor Munkin --- **NB**: This patch will be placed before "[PATCH luajit 01/15] test: fix E122 errors by pycodestyle" on the branch. CI: https://github.com/tarantool/luajit/actions/runs/5785962723/job/15679677849 src/luajit-gdb.py | 2 +- src/luajit_lldb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py index 9075e99f..b7902d53 100644 --- a/src/luajit-gdb.py +++ b/src/luajit-gdb.py @@ -327,7 +327,7 @@ def itypemap(o): def funcproto(func): - assert(func['ffid'] == 0) + assert func['ffid'] == 0 return cast('GCproto *', mref('char *', func['pc']) - gdb.lookup_type('GCproto').sizeof) diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py index 85c0dcb9..94f54a59 100644 --- a/src/luajit_lldb.py +++ b/src/luajit_lldb.py @@ -516,7 +516,7 @@ def strx64(val): def funcproto(func): - assert(func.ffid == 0) + assert func.ffid == 0 proto_size = sizeof('GCproto') value = cast('uintptr_t', vtou64(mref('char *', func.pc)) - proto_size) return cast(GCprotoPtr, value) -- 2.30.2