This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 3/4] gdbserver: Add powerpc fast tracepoint support.
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: Marcin KoÅcielnicki <koriakin at 0x04 dot net>, <gdb-patches at sourceware dot org>
- Date: Wed, 30 Mar 2016 11:28:05 -0400
- Subject: Re: [PATCH v2 3/4] gdbserver: Add powerpc fast tracepoint support.
- Authentication-results: sourceware.org; auth=none
- References: <20160330145738 dot CB3D24989 at oc7340732750 dot ibm dot com> <56FBEFA6 dot 5090301 at ericsson dot com>
On 16-03-30 11:24 AM, Simon Marchi wrote:
> On 16-03-30 10:57 AM, Ulrich Weigand wrote:
>> Hi Marcin,
>>
>>> 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 'is_elfv2_inferior':
>>> linux-ppc-low.c:774:26: error: 'EF_PPC64_ABI' undeclared (f=
>>> irst use in this function)
>>> return (ehdr.e_flags & EF_PPC64_ABI) == 2;
>>
>> You probably should add
>>
>> #include "elf/ppc64.h"
>>
>> to make sure you always got the latest defines from the in-tree
>> BFD headers, and not the (possibly outdated) system headers.
>>
>> Bye,
>> Ulrich
>
> I now get this:
>
> In file included from ./../../include/elf/ppc64.h:24:0,
> from linux-ppc-low.c:30:
> ./../../include/elf/ppc64.h:28:17: error: expected identifier before numeric constant
> RELOC_NUMBER (R_PPC64_NONE, 0)
> ^
> ./../../include/elf/reloc-macros.h:122:37: note: in definition of macro ‘RELOC_NUMBER’
> #define RELOC_NUMBER(name, number) name = number,
> ^
> In file included from linux-ppc-low.c:30:0:
> ./../../include/elf/ppc64.h:240:0: error: "DT_PPC64_GLINK" redefined [-Werror]
> #define DT_PPC64_GLINK DT_LOPROC
> ^
> In file included from linux-ppc-low.c:23:0:
> /usr/include/elf.h:2264:0: note: this is the location of the previous definition
> #define DT_PPC64_GLINK (DT_LOPROC + 0)
> ^
>
> Simon
Ahh, it seems like the ordering is important here. If I include it before <elf.h> (and
everything that includes <elf.h>), it works.
Thanks,
Simon