From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64582 invoked by alias); 15 Jun 2017 21:12:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 64562 invoked by uid 89); 15 Jun 2017 21:12:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Jun 2017 21:12:52 +0000 Received: by simark.ca (Postfix, from userid 33) id 0F4E61E5A4; Thu, 15 Jun 2017 17:12:55 -0400 (EDT) To: Anton Kolesov Subject: Re: [PATCH v3] arc: Select CPU model properly before disassembling X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 15 Jun 2017 21:12:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org, Francois Bedard In-Reply-To: <20170615132040.11554-1-Anton.Kolesov@synopsys.com> References: <02d18307-f315-bc64-d9f3-550feaf01b41@redhat.com> <20170615132040.11554-1-Anton.Kolesov@synopsys.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00452.txt.bz2 On 2017-06-15 15:20, Anton Kolesov wrote: > @@ -2041,6 +2067,31 @@ arc_gdbarch_init (struct gdbarch_info info, > struct gdbarch_list *arches) > if (tdep->jb_pc >= 0) > set_gdbarch_get_longjmp_target (gdbarch, arc_get_longjmp_target); > > + /* Disassembler options. Enforce CPU if it was specified in XML > target > + description, otherwise use default method of determining CPU (ELF > private > + header). */ > + if (info.target_desc != NULL) > + { > + const struct bfd_arch_info *tdesc_arch > + = tdesc_architecture (info.target_desc); > + if (tdesc_arch != NULL) > + { > + free (arc_disassembler_options); Nit: Use xfree instead of free. You can fix that and push directly. Thanks! Simon