From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2140 invoked by alias); 30 Mar 2016 14:52:19 -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 2122 invoked by uid 89); 30 Mar 2016 14:52:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=todays, today's, constantly, H*F:D*ericsson.com X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 30 Mar 2016 14:52:17 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id BD.F5.22441.BF7EBF65; Wed, 30 Mar 2016 16:51:39 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.89) with Microsoft SMTP Server id 14.3.248.2; Wed, 30 Mar 2016 10:52:14 -0400 Subject: Re: [PATCH v2 3/4] gdbserver: Add powerpc fast tracepoint support. To: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= , References: <20160317063043.CC6151537@oc7340732750.ibm.com> <1458313764-6060-1-git-send-email-koriakin@0x04.net> CC: From: Simon Marchi Message-ID: <56FBE81E.4070708@ericsson.com> Date: Wed, 30 Mar 2016 14:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458313764-6060-1-git-send-email-koriakin@0x04.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00566.txt.bz2 Hi Marcin, One note below. On 16-03-18 11:09 AM, Marcin Ko=C5=9Bcielnicki wrote: > +#ifdef __powerpc64__ > + > +/* Returns 1 if inferior is using ELFv2 ABI. Undefined for 32-bit > + inferiors. */ > + > +static int > +is_elfv2_inferior (void) > +{ > + /* To be used as fallback if we're unable to determine the right resul= t - > + assume inferior uses the same ABI as gdbserver. */ > +#if _CALL_ELF =3D=3D 2 > + const int def_res =3D 1; > +#else > + const int def_res =3D 0; > +#endif > + unsigned long phdr; > + Elf64_Ehdr ehdr; > + > + if (!ppc_get_auxv (AT_PHDR, &phdr)) > + return def_res; > + > + /* Assume ELF header is at the beginning of the page where program hea= ders > + are located. If it doesn't look like one, bail. */ > + > + read_inferior_memory (phdr & ~0xfff, (unsigned char *) &ehdr, sizeof e= hdr); > + if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG)) > + return def_res; > + > + return (ehdr.e_flags & EF_PPC64_ABI) =3D=3D 2; > +} This gives me an error when building on the gcc compile farm machine gcc110= . I just applied your patches on today's master. linux-ppc-low.c: In function =E2=80=98is_elfv2_inferior=E2=80=99: linux-ppc-low.c:774:26: error: =E2=80=98EF_PPC64_ABI=E2=80=99 undeclared (f= irst use in this function) return (ehdr.e_flags & EF_PPC64_ABI) =3D=3D 2; ^ linux-ppc-low.c:774:26: note: each undeclared identifier is reported only o= nce for each function it appears in linux-ppc-low.c:775:1: error: control reaches end of non-void function [-We= rror=3Dreturn-type] } ^ I am not familiar with PPC, so I have no idea how to fix it. I just replac= ed it "return 0" so that it built, and I was able to test what I wanted to test :). Side note, would it be possible to avoid putting the ChangeLog changes in t= he diff? It makes it overly complicated to apply patches since there are constantly some conf= licts. It's common to put them in the commit message for the review, and add them to the actua= l patch at commit time. Thanks! Simon