This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 11 Feb 2016 11:17:50 +0000
- Subject: Re: [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding
- Authentication-results: sourceware.org; auth=none
- References: <1455121027-27061-1-git-send-email-simon dot marchi at ericsson dot com>
Simon Marchi <simon.marchi@ericsson.com> writes:
> I am currently working on extracting the instruction decoding from the
> displaced stepping support in arm-tdep.c, in order to share the functionality
> with the upcoming fast tracepoint support. I did a few refactors that helped
> me correlate the code with the ARM Architecture Reference Manual. I think the
> change helps readability in general, and especially when you have the manual
> open on the side.
>
> The idea is to follow the the order of the manual, use the same names and do
> the same "checks" (avoid using unnecessary shortcuts that make the code more
> cryptic).
It is good to match the code to the manual. The instruction encoding
can't change, but the order or the category of instruction _may_ change in
the manual in the future. I am not the manual writer, but writers may
want to refactor the doc in the future too :)
Although your change is code refactor, better to run tests.
--
Yao (éå)