From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Mikhail Elhimov <elhimov@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/2] gdb: adjust to support python2 (centos 7)
Date: Wed, 31 Aug 2022 17:47:16 +0300 [thread overview]
Message-ID: <Yw90dHw3HgRaRUbM@tarantool.org> (raw)
In-Reply-To: <9eaffd397e8ebb3ccb898d50686249b9edd3f02f.1658531255.git.m.elhimov@vk.team>
Misha,
Thanks for the patch! Almost LGTM after your fixes for Sergey comments:
please, consider the last nit, I found.
On 23.07.22, Mikhail Elhimov via Tarantool-patches wrote:
> Stop using unpacking arguments within list initialization as python2
> only supports it in function call
>
> fixes tarantool/luajit#7458
> ---
> src/luajit-gdb.py | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
> index baf66f66..1e9a96fb 100644
> --- a/src/luajit-gdb.py
> +++ b/src/luajit-gdb.py
> @@ -432,15 +432,16 @@ def dump_stack(L, base=None, top=None):
> maxstack = mref('TValue *', L['maxstack'])
> red = 5 + 2 * LJ_FR2
>
> - dump = '\n'.join([
> - '{padding} Red zone: {nredslots: >2} slots {padding}'.format(
> - padding = '-' * len(PADDING),
> - nredslots = red,
> - ),
> - *(
> - dump_stack_slot(L, maxstack + offset, base, top, '')
> - for offset in range(red, 0, -1)
> - ),
> + dump = []
Please move this line to the "definition" section above to save the
original structure.
> + dump.append('{padding} Red zone: {nredslots: >2} slots {padding}'.format(
> + padding = '-' * len(PADDING),
> + nredslots = red,
> + ))
> + dump.extend([
> + dump_stack_slot(L, maxstack + offset, base, top, '')
> + for offset in range(red, 0, -1)
> + ])
> + dump.extend([
> '{padding} Stack: {nstackslots: >5} slots {padding}'.format(
> padding = '-' * len(PADDING),
> nstackslots = int((tou64(maxstack) - tou64(stack)) >> 3),
> @@ -451,7 +452,8 @@ def dump_stack(L, base=None, top=None):
> end = strx64(maxstack - 1),
> nfreeslots = int((tou64(maxstack) - tou64(top) - 8) >> 3),
> ),
> - ]) + '\n'
> + ])
> + dump = '\n'.join(dump) + '\n'
>
> slot = top
> framelink = base - (1 + LJ_FR2)
> --
> 2.34.1
>
--
Best regards,
IM
next prev parent reply other threads:[~2022-08-31 14:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 0:11 [Tarantool-patches] [PATCH 0/2] gdb: adjust to support Python 2 + refactoring of stack dumping Mikhail Elhimov via Tarantool-patches
2022-07-23 0:11 ` [Tarantool-patches] [PATCH 1/2] gdb: adjust to support python2 (centos 7) Mikhail Elhimov via Tarantool-patches
2022-08-20 6:26 ` Sergey Kaplun via Tarantool-patches
2022-08-22 13:00 ` Mikhail Elhimov via Tarantool-patches
2022-08-22 17:46 ` Mikhail Elhimov via Tarantool-patches
2022-08-31 14:47 ` Igor Munkin via Tarantool-patches [this message]
2022-08-31 23:17 ` Mikhail Elhimov via Tarantool-patches
2022-07-23 0:11 ` [Tarantool-patches] [PATCH 2/2] gdb: refactor iteration over frames while dumping stack Mikhail Elhimov via Tarantool-patches
2022-08-20 6:28 ` Sergey Kaplun via Tarantool-patches
2022-08-23 9:13 ` Mikhail Elhimov via Tarantool-patches
2022-08-31 14:47 ` Igor Munkin via Tarantool-patches
2022-08-31 23:20 ` Mikhail Elhimov via Tarantool-patches
2022-09-14 21:28 ` Igor Munkin via Tarantool-patches
2022-11-11 8:53 ` [Tarantool-patches] [PATCH 0/2] gdb: adjust to support Python 2 + refactoring of stack dumping Igor Munkin 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=Yw90dHw3HgRaRUbM@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=elhimov@gmail.com \
--cc=imun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/2] gdb: adjust to support python2 (centos 7)' \
/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