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~