FW: [PATCH 2/2] gdbserver: Add linux_get_hwcap

Ulrich Weigand uweigand@de.ibm.com
Thu Mar 28 09:50:00 GMT 2019


Alan Hayward wrote:

>            * linux-low.c (linux_get_auxv): New function.
>            (linux_get_hwcap): Likewise.
>            (linux_get_hwcap2): Likewise.

This still breaks the build on my Cell/B.E. dailybuild:

gdb/gdbserver/linux-low.c: In function 'CORE_ADDR linux_get_hwcap2(int)':
gdb/gdbserver/linux-low.c:7471:36: error: 'AT_HWCAP2' was not declared in this scope
   return linux_get_auxv (wordsize, AT_HWCAP2);
                                    ^~~~~~~~~

The system (RHEL5) is so old that the system headers do not
yet provide AT_HWCAP2.  The old code worked because
linux-ppc-low.c got the define via #include "elf/common.h",
which linux-low.c does not include.

I guess we should either have linux-low.c include the local
file as well (if that is possible -- there may be conflicts
with <elf.h> that is otherwise already included), or else
provide a fallback define of AT_HWCAP2 only.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list