From: Tom Musta <tommusta@gmail.com>
To: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH v7] target-ppc: gdbstub allow byte swapping for reading/writing registers
Date: Fri, 04 Apr 2014 08:33:21 -0500 [thread overview]
Message-ID: <533EB4A1.3020807@gmail.com> (raw)
In-Reply-To: <1396382633-6769-1-git-send-email-tlfalcon@linux.vnet.ibm.com>
On 4/1/2014 3:03 PM, Thomas Falcon wrote:
> 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. It accomplishes this goal by byte swapping the values of
> any registers if the MSR:LE value is set.
>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
<snip>
> index 1c91090..92649ed 100644
> --- a/target-ppc/gdbstub.c
> +++ b/target-ppc/gdbstub.c
> @@ -21,6 +21,82 @@
> #include "qemu-common.h"
> #include "exec/gdbstub.h"
>
> +static int ppc_cpu_gdb_register_len(int n)
> +{
> + switch (n) {
> + case 0 ... 31:
> + /* gprs */
> + return sizeof(target_ulong);
> + case 32 ... 63:
> + /* fprs */
> + if (gdb_has_xml) {
> + return 0;
> + }
> + return 8;
The magic numbers in the case statement are not ideal but there is
precedent in the code already for this.
Reviewed-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
next prev parent reply other threads:[~2014-04-04 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 20:03 [Qemu-devel] [PATCH v7] target-ppc: gdbstub allow byte swapping for reading/writing registers Thomas Falcon
2014-04-04 13:33 ` Tom Musta [this message]
2014-04-04 14:01 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533EB4A1.3020807@gmail.com \
--to=tommusta@gmail.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=tlfalcon@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).