[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/9] disas: Support the Capstone disassembler
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/9] disas: Support the Capstone disassembler library |
Date: |
Mon, 2 Oct 2017 21:51:12 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/02/2017 02:45 PM, Philippe Mathieu-Daudé wrote:
> On 10/02/2017 03:34 PM, Richard Henderson wrote:
>> On 10/02/2017 09:36 AM, Philippe Mathieu-Daudé wrote:
>>> Maybe some defines like:
>>>
>>> #define LARGEST_TARGET_INSTR_SIZE 32
>>>
>>> #define MINIMUM_TARGET_PAGE_SIZE 1024
>>
>> Eh. If I weren't simply pulling numbers out of my hat, perhaps.
>> Does it really make things clearer beyond sizeof or a great big comment?
>
> big comment is great!
Like the one that's already there?
+ /* We want to read memory for one insn, but generically we do not
+ know how much memory that is. We have a small buffer which is
+ known to be sufficient for all supported targets. Try to not
+ read beyond the page, Just In Case. For even more simplicity,
+ ignore the actual target page size and use a 1k boundary. If
+ that turns out to be insufficient, we'll come back around the
+ loop and read more. */
r~