Am 07.04.2014 22:02, schrieb Thomas Falcon:
> This patch allows registers to be properly read from and written to
> when using the gdbstub to debug a ppc guest running in little
> endian mode.
> 
> Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com>
> ---
> Differences from v8:
> 
> Separated into multiple patches
> ppc_gdb_swap_register(...) is now a static function
> Removed "cpu" from the function named
> Cleaned up the comments
> ---
>  target-ppc/gdbstub.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/target-ppc/gdbstub.c b/target-ppc/gdbstub.c
> index 0740af8..e774db1 100644
> --- a/target-ppc/gdbstub.c
> +++ b/target-ppc/gdbstub.c
> @@ -59,6 +59,17 @@ static int ppc_gdb_register_len(int n)
>  }
>  
>  
> +static void ppc_gdb_swap_register(uint8_t *mem_buf, int n, int len)
> +{
> +    if (len == 4) {
> +        bswap32s((uint32_t *)mem_buf);
> +    } else if (len == 8){

Space missing here, but otherwise

Reviewed-by: Andreas Färber <afaer...@suse.de>

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to