From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>,
binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/6] Unify the disassembler selection in gdb and objdump
Date: Tue, 23 May 2017 09:19:00 -0000 [thread overview]
Message-ID: <4043318f-b008-1f51-3aa9-2d8fab461273@redhat.com> (raw)
In-Reply-To: <1494931698-15309-1-git-send-email-yao.qi@linaro.org>
On 05/16/2017 11:48 AM, Yao Qi wrote:
> Nowadays, we have opcodes library which provides disassembler for each
> architecture (print_insn_XX functions), and gdb, objdump and sim use
> them. However, they (at least gdb and objdump) select disassembler
> in different places, so this causes some duplicated code and
> inconsistencies.
>
> This patch series change gdb selecting disassembler through
> opcodes/disassemble.c:disassembler in default, but there are still
> some targets select their disassemblers in their own way (AFAICS,
> they can be changed to disassemble.c:disassembler too in the
> follow up patches).
>
> Patch #1 refactor the code. Patch #2 does the major change in this
> series, but only apply to the obvious places. Patch #3-4 do the
> similar changes too, but not as obvious as patch #2. Patch #5
> fixes the inconsistency of rs6000 disassembler selection. As a
> result of these changes, a lot of print_insn_XXX functions are no
> longer needed out side of opcodes library, so patch #6, as an RFC,
> moves these function declarations from include/dis-asm.h to an
> internal header in opcodes/.
>
> If this series is on the right track, I'll change the rest of gdb
> ports (like arm, mips, aarch64, etc) to default disassembler
> selection.
I like this.
Eliminating objdump / gdb inconsistencies by design is great.
Passing arch/mach to opcodes:disassembler makes it possible to
have gdb tell opcodes to select the right disassembler based on
what arch the remote target description says the target has, even
without a bfd.
The GDB parts look good to me.
>
> The series is tested for gdb on x86_64-linux and ppc64-linux (gcc110).
Good testing. I was wondering whether the POWER/gdb change had any
visible effect on the testsuite.
[OTOH, if it didn't, then it sounds like we're missing some kind of
test that exercises default disassembler selection].
> It is also tested for binutils/ld/gas on x86_64-linux with all targets
> enabled.
Thanks,
Pedro Alves
prev parent reply other threads:[~2017-05-23 9:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 10:49 Yao Qi
2017-05-16 10:48 ` [PATCH 5/6] Use disassble.c:disassembler select rs6000 disassembler Yao Qi
2017-05-16 10:48 ` [PATCH 4/6] Use disassble.c:disassembler select rl78 disassembler Yao Qi
2017-05-16 10:48 ` [PATCH 2/6] Delegate opcodes to select disassembler in GDB Yao Qi
2017-06-30 0:19 ` Maciej W. Rozycki
2017-06-30 7:38 ` Yao Qi
2017-07-05 23:53 ` Maciej W. Rozycki
2017-07-07 16:41 ` Yao Qi
2017-08-01 16:31 ` Maciej W. Rozycki
2017-05-16 10:49 ` [RFC 6/6] Move print_insn_XXX to an opcodes internal header Yao Qi
2017-05-16 10:49 ` [PATCH 1/6] Refactor disassembler selection Yao Qi
2017-05-16 10:49 ` [PATCH 3/6] Use disassble.c:disassembler select h8300 disassembler Yao Qi
2017-05-17 3:00 ` [PATCH 0/6] Unify the disassembler selection in gdb and objdump Alan Modra
2017-05-24 16:26 ` Yao Qi
2017-05-23 9:19 ` Pedro Alves [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=4043318f-b008-1f51-3aa9-2d8fab461273@redhat.com \
--to=palves@redhat.com \
--cc=binutils@sourceware.org \
--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