From: Simon Marchi <simon.marchi@ericsson.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding
Date: Tue, 16 Feb 2016 15:26:00 -0000 [thread overview]
Message-ID: <56C33FA1.7010409@ericsson.com> (raw)
In-Reply-To: <86si0zpkbl.fsf@gmail.com>
On 16-02-11 06:17 AM, Yao Qi wrote:
> 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.
Yes, that is the part that is worrying me. Since we don't have unit tests,
I am too afraid to break things.
I'll forget this patch set for the time being. When the code is extracted to
its own file and decoupled from the core of GDB, maybe there will be some way
to write some kind of unit tests that ensure that the refactor is safe.
Thanks for reviewing anyway!
prev parent reply other threads:[~2016-02-16 15:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 16:17 Simon Marchi
2016-02-10 16:17 ` [PATCH 2/3] arm-tdep.c: Refactor arm_decode_dp_misc Simon Marchi
2016-02-11 11:52 ` Yao Qi
2016-02-11 17:10 ` Yao Qi
2016-02-11 17:18 ` Simon Marchi
2016-02-10 16:17 ` [PATCH 1/3] arm-tdep.c: Refactor arm_process_displaced_insn Simon Marchi
2016-02-11 11:22 ` Yao Qi
2016-02-11 16:59 ` Simon Marchi
2016-02-12 16:56 ` Yao Qi
2016-02-10 16:17 ` [PATCH 3/3] arm-tdep.c: Refactor arm_decode_media Simon Marchi
2016-02-11 11:58 ` Yao Qi
2016-02-11 11:17 ` [PATCH 0/3] Minor refactorings in arm-tdep.c instruction decoding Yao Qi
2016-02-16 15:26 ` Simon Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C33FA1.7010409@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox