This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] PR 20939: Handle error in disassembly
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 14 Dec 2016 22:05:27 +0000
- Subject: Re: [RFC] PR 20939: Handle error in disassembly
- Authentication-results: sourceware.org; auth=none
- References: <20161212104825.GA25542@E107787-LIN> <f2ee7ac0-8f9f-40fd-0609-acf10874e086@redhat.com>
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