From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35862 invoked by alias); 15 Feb 2017 22:27:29 -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 35849 invoked by uid 89); 15 Feb 2017 22:27:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=disassembling, distinguished, mach, doubleword X-HELO: mail-qk0-f196.google.com Received: from mail-qk0-f196.google.com (HELO mail-qk0-f196.google.com) (209.85.220.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Feb 2017 22:27:18 +0000 Received: by mail-qk0-f196.google.com with SMTP id e1so39379qkh.1 for ; Wed, 15 Feb 2017 14:27:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fIC32zQKtR0tKWCC9PLSVEODWeeezTlHLuYW8OP3tgg=; b=MAsRneTFxNVM4lAS9j9GzPhFosFWGwTF9av1b7zyte0ZqrrJgS/omZckZdKLlKaiYY qR1VzA8+KGjldcxZe/7+6D/F+JZhh2qYJodjCmXOvQcZ/lmrC5zHvOLwBX2WzAVzxjgy MPl1YtftUXTExCl3lRy1SvCyL9970SuH85Ug6KJGiu91w3xnLbRquT7u929kc4NmWpaX ir4NMo792XcjdWDvTYBx9QCZAyBzXD9ZNgfqgGcGojZyEsjjQaS4X4JtRzr7N7dzSIyJ ulRSbZmKqWCXq6iQtoXmsbq0Mmgbo8VPh6WzeGiOTEc7VL8g+lDohADO0RbMXUMHvbYO rR9g== X-Gm-Message-State: AMke39mXVjFvUGiIo8+Rx0ab84Z/8GLEN1TddO3toSKKjp7Bj4Dte3HzPxJHVwcUCGTdut5GH0jFB/28NwP79g== X-Received: by 10.55.42.207 with SMTP id q76mr22551171qkq.35.1487197637174; Wed, 15 Feb 2017 14:27:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.140.194 with HTTP; Wed, 15 Feb 2017 14:27:16 -0800 (PST) In-Reply-To: <20170214100130.29194-2-Anton.Kolesov@synopsys.com> References: <20170214100130.29194-1-Anton.Kolesov@synopsys.com> <20170214100130.29194-2-Anton.Kolesov@synopsys.com> From: Yao Qi Date: Wed, 15 Feb 2017 22:27:00 -0000 Message-ID: Subject: Re: [PATCH 2/5] arc: Set section to ".text" when disassembling To: Anton Kolesov Cc: "gdb-patches@sourceware.org" , Francois Bedard Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00424.txt.bz2 On Tue, Feb 14, 2017 at 10:01 AM, Anton Kolesov wrote: > + > + /* ARC disassembler requires that info->section is valid - it will be = used to > + access program headers of ELF files that is needed to distinguish b= etween > + ARC EM and HS (ARC600, ARC700 and ARC v2 can be distinguished by BF= D's > + `mach` attribute). Without this information disassembler will defa= ult to > + ARC EM for ARC v2 targets, and it will not recognize instructions s= pecific > + to ARC HS, for example, double-word store and load. */ > + if (exec_bfd !=3D NULL) > + info->section =3D bfd_get_section_by_name (exec_bfd, ".text"); info->section should be valid, but why must it be ".text"? Can I disassemb= ly instructions in .plt section? How about using find_pc_section (addr) to get the right section? like mep_gdb_print_insn. --=20 Yao (=E9=BD=90=E5=B0=A7)