This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/8] [PowerPC] Disable regsets using zero sizes in gdbserver
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedromfc at linux dot vnet dot ibm dot com (Pedro Franco de Carvalho)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 16 May 2018 17:53:13 +0200 (CEST)
- Subject: Re: [PATCH 3/8] [PowerPC] Disable regsets using zero sizes in gdbserver
Pedro Franco de Carvalho wrote:
> gdb/gdbserver/ChangeLog:
> yyyy-mm-dd Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
>
> * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
> (ppc_store_vsxregset): Likewise.
> (ppc_fill_vrregset): Likewise.
> (ppc_store_vrregset): Likewise.
> (ppc_fill_evrregset): Likewise.
> (ppc_store_evrregset): Likewise.
> (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
> (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
> needed.
> + for (regset = ppc_regsets; regset->size >= 0; regset++)
> + switch (regset->get_request)
> + {
> + case PTRACE_GETVRREGS:
> + regset->size = features.altivec ? SIZEOF_VRREGS : 0;
> + break;
> + case PTRACE_GETVSXREGS:
> + regset->size = features.vsx ? SIZEOF_VSXREGS : 0;
> + break;
> + case PTRACE_GETEVRREGS:
> + if (ppc_hwcap & PPC_FEATURE_HAS_SPE)
> + regset->size = 32 * 4 + 8 + 4;
This should also zero out the size if the feature is not available,
just like the other cases. Otherwise, this is OK.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com