qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 2/2] target-ppc: gdbstub allow byte swapping


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v9 2/2] target-ppc: gdbstub allow byte swapping for reading/writing registers
Date: Mon, 07 Apr 2014 22:30:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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 <address@hidden>
> ---
> 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 <address@hidden>

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

[Prev in Thread] Current Thread [Next in Thread]