From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCHv3 2/2] gdb/python: extend the Python Disassembler API to allow for styling
Date: Fri, 19 May 2023 10:13:56 +0100 [thread overview]
Message-ID: <871qjcadkb.fsf@redhat.com> (raw)
In-Reply-To: <7278f86e-3662-3e9f-a4c3-60259dafe4aa@suse.de>
Tom de Vries <tdevries@suse.de> writes:
> On 5/17/23 19:46, Andrew Burgess wrote:
>> Tom de Vries <tdevries@suse.de> writes:
>>
>>> On 5/12/23 19:50, Andrew Burgess via Gdb-patches wrote:
>>>> This commit extends the Python Disassembler API to allow for styling
>>>> of the instructions.
>>>>
>>>
>>> I'm running into:
>>> ...
>>> FAIL: gdb.python/py-disasm.exp:
>>> global_disassembler=ErrorCreatingTextPart_NoArgs: disassemble test
>>> FAIL: gdb.python/py-disasm.exp:
>>> global_disassembler=ErrorCreatingAddressPart_NoArgs: disassemble test
>>> FAIL: gdb.python/py-disasm.exp:
>>> global_disassembler=ErrorCreatingTextPart_NoString: disassemble test
>>> FAIL: gdb.python/py-disasm.exp:
>>> global_disassembler=ErrorCreatingTextPart_NoStyle: disassemble test
>>> FAIL: gdb.python/py-disasm.exp: try to create a DisassemblerResult
>>> without a length argument
>>> ...
>>>
>>> First in more detail:
>>> ...
>>> (gdb) disassemble test^M
>>> Dump of assembler code for function test:^M
>>> 0x00000000004004a7 <+0>: push %rbp^M
>>> 0x00000000004004a8 <+1>: mov %rsp,%rbp^M
>>> 0x00000000004004ab <+4>: nop^M
>>> => 0x00000000004004ac <+5>: Python Exception <class 'TypeError'>:
>>> Required argument 'style' (pos 1) not found^M
>>> ^M
>>> unknown disassembler error (error = -1)^M
>>> (gdb) FAIL: gdb.python/py-disasm.exp:
>>> global_disassembler=ErrorCreatingTextPart_NoArgs: disassemble test
>>> ...
>>>
>>> This seems to be due to the test-case expecting " function missing
>>> required argument ..." but getting "Required argument ..."
>>
>> Sorry for that.
>
> Np of course :)
>
>> I guess you must be using an older (3.6.x or earlier)
>> version of Python?
>>
>
> /me checks:
> ...
> $ python3 --version
> Python 3.6.15
> ...
> Yes.
>
>> The patch below should resolve the issues, I'll push this tomorrow.
>>
>
> I've checked, it does, thanks.
>
Thanks for checking. I pushed this patch.
Thanks,
Andrew
next prev parent reply other threads:[~2023-05-19 9:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <id:87cz3na9jm.fsf@redhat.com>
2023-05-12 17:50 ` [PATCHv3 0/2] Disassembler Styling And The Python API Andrew Burgess
2023-05-12 17:50 ` [PATCHv3 1/2] gdb/python: rework how the disassembler API reads the result object Andrew Burgess
2023-05-12 17:50 ` [PATCHv3 2/2] gdb/python: extend the Python Disassembler API to allow for styling Andrew Burgess
2023-05-16 11:01 ` Andrew Burgess
2023-05-17 4:16 ` Tom de Vries
2023-05-17 17:46 ` Andrew Burgess
2023-05-17 19:36 ` Tom de Vries
2023-05-19 9:13 ` Andrew Burgess [this message]
2023-05-12 19:14 ` [PATCHv3 0/2] Disassembler Styling And The Python API Tom Tromey
2023-05-16 9:32 ` Andrew Burgess
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=871qjcadkb.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).