This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 8/8] [PowerPC] Recognize isa205 in linux core files


Pedro Franco de Carvalho wrote:

> gdb/ChangeLog:
> yyyy-mm-dd  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
> 
> 	* arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
> 	parameter type to CORE_ADDR.
> 	* arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
> 	parameter type in declaration to CORE_ADDR.
> 	* ppc-linux-tdep.c (ppc_linux_core_read_description): Call
> 	target_auxv_search to get AT_HWCAP and use the result to get the
> 	target description.
> 	* ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type to
> 	CORE_ADDR. Remove the cast of the return value to unsigned
> 	long. Check if target_auxv_search returns a value greater than
> 	zero instead of non-zero.
> 	(ppc_linux_nat_target::read_description): Change the type of the
> 	hwcap variable to CORE_ADDR.
> 
> gdb/testsuite/ChangeLog:
> yyyy-mm-dd  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
> 
> 	* gdb.arch/powerpc-fpscr-gcore.exp: New file.

>  /* Fetch the AT_HWCAP entry from the aux vector.  */
> -static unsigned long
> +static CORE_ADDR
>  ppc_linux_get_hwcap (void)
>  {
>    CORE_ADDR field;
>  
> -  if (target_auxv_search (target_stack, AT_HWCAP, &field))
> -    return (unsigned long) field;
> +  if (target_auxv_search (target_stack, AT_HWCAP, &field) > 0)
> +    return field;
>  
>    return 0;
>  }

Maybe this routine should now be moved to ppc-linux-tdep.c ...

> +  CORE_ADDR hwcap = 0;
> +
> +  target_auxv_search (target, AT_HWCAP, &hwcap);
> +
> +  features.isa205 = ppc_linux_has_isa205 (hwcap);

... so it can be reused here?

Otherwise this looks OK to me.

Thanks,
Ulrich

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]