From: Richard Henderson <richard.henderson@linaro.org>
To: "Helge Deller" <deller@gmx.de>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org
Cc: Alistair Francis <Alistair.Francis@wdc.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
qemu-riscv@nongnu.org, Song Gao <gaosong@loongson.cn>
Subject: Re: [PATCH 1/4] disas: introduce no_raw_bytes
Date: Mon, 4 Mar 2024 12:43:54 -1000 [thread overview]
Message-ID: <5005bee5-34d3-47d6-8420-51559beb0222@linaro.org> (raw)
In-Reply-To: <379f2c3f-9449-47b0-977f-bf07a5b6f88a@gmx.de>
On 3/4/24 09:26, Helge Deller wrote:
> On 3/4/24 20:13, Alex Bennée wrote:
>> For plugins we don't expect the raw bytes in the disassembly. We
>> already deal with this by hand crafting our capstone call but for
>> other diassemblers we need a flag.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> include/disas/dis-asm.h | 7 +++++++
>> disas/disas.c | 1 +
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h
>> index 2324f6b1a46..5c32e7a310c 100644
>> --- a/include/disas/dis-asm.h
>> +++ b/include/disas/dis-asm.h
>> @@ -396,6 +396,13 @@ typedef struct disassemble_info {
>> /* Command line options specific to the target disassembler. */
>> char * disassembler_options;
>>
>> + /*
>> + * When true instruct the disassembler to not preface opcodes with
>> + * raw bytes. This is mainly for the benefit of the plugin
>> + * interface.
>> + */
>> + bool no_raw_bytes;
>
> Patch in general and idea is OK, but I don't like
> the "no_raw_bytes" naming very much.
> In patch #2 you use "if (!info->no_raw_bytes) {.."
> which is double-negation.
>
> "hide_raw_bytes" is better but still double negation.
>
> Maybe something like "show_opcodes" which defaults to "false"
> when used with plugins is better?
Agreed.
r~
next prev parent reply other threads:[~2024-03-04 22:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 19:13 [PATCH 0/4 for 9.0] Clean-up disassembler handling for plugins Alex Bennée
2024-03-04 19:13 ` [PATCH 1/4] disas: introduce no_raw_bytes Alex Bennée
2024-03-04 19:26 ` Helge Deller
2024-03-04 22:43 ` Richard Henderson [this message]
2024-03-04 19:13 ` [PATCH 2/4] disas/hppa: honour no_raw_bytes Alex Bennée
2024-03-04 19:13 ` [PATCH 3/4] target/loongarch: honour no_raw_bytes when disassembling Alex Bennée
2024-03-04 19:13 ` [PATCH 4/4] target/riscv: " Alex Bennée
2024-03-06 0:14 ` Alistair Francis
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=5005bee5-34d3-47d6-8420-51559beb0222@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=alex.bennee@linaro.org \
--cc=deller@gmx.de \
--cc=gaosong@loongson.cn \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
/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 NNTP newsgroup(s).