This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2 1/2] [ARC] Fix handling of cpu=... disassembler option value
- From: Pedro Alves <palves at redhat dot com>
- To: Anton Kolesov <Anton dot Kolesov at synopsys dot com>, binutils at sourceware dot org
- Cc: Francois Bedard <Francois dot Bedard at synopsys dot com>, Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>, Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>, Peter Bergner <bergner at vnet dot ibm dot com>
- Date: Tue, 20 Jun 2017 11:32:47 +0100
- Subject: Re: [PATCH v2 1/2] [ARC] Fix handling of cpu=... disassembler option value
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2B50080C15
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2B50080C15
- References: <2b79f9f2-77a1-4718-4455-40991c65dc41@vnet.ibm.com> <20170619144011.8157-1-Anton.Kolesov@synopsys.com>
On 06/19/2017 03:40 PM, Anton Kolesov wrote:
> Changes in V2:
>
> * Use disassembler_options_cmp to compare string instead of using strtok, which
> required string duplication.
> * Add a second patch that introduces usage of FOR_EACH_DISASSEMBLER_OPTION to
> ARC.
Thanks for doing this.
Both patches look good to me (but note I'm not an opcodes maintainer).
>From the nit department:
- I'm not sure on coding standard on the bfd side, but on the gdb side
you'd write "disassembler_options_cmp (...) == 0" instead of
!disassembler_options_cmp, since the return value isn't a boolean.
- Spurious leading space after TAB in the ChangeLog entry.
It's kind of a shame IMHO to fix bugs like these without adding
regression tests, to prevent regressions (and to prove it
works :-)). Could something be easily added to
testsuite/binutils-all/arc/ perhaps?
Both ARM and Power test these FOR_EACH_DISASSEMBLER_OPTION-related paths
using GDB's testsuite. Grep for "set disassembler-options" under
gdb/testsuite/gdb.arch/. But IIUC, ARC doesn't support
"set disassembler-options" yet, right?
Thanks,
Pedro Alves