Re: [RFC] PR 20939: Handle error in disassembly

Yao Qi
2016-12-14T22:05:31Z

On 16-12-14 17:31:18, Pedro Alves wrote:
>
> Did you try to find the discussions around when the current
> interface based on throwing (using longjmp at the time) was added?
> Maybe the "return -1" option was considered back then, but
> discarded for some reason?

Such interface was added in 1993,
5d0734a7d74cf01b73303aeb884b719b4b220035 there wasn't any
discussions.

>
> E.g., looks like simply "return -1" would lose the actual
> address that failed to be read, in case opcodes does several
> reads in sequence and its not the first that fails. We could
> add some other means to get at that, of course.
>

I thought about this beofre. We can't get the actual address that
failed to be read today, because we read a piece of memory in
dis_asm_read_memory, but only report error from the starting
address. So I think it isn't very important to report the error with
the accurate memory address failed to be read.

--
Yao