qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Fabiano Rosas <farosas@linux.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v4 3/3] target/ppc: Enable reporting of SPRs to GDB
Date: Thu, 24 Jan 2019 18:23:33 +1100	[thread overview]
Message-ID: <d102e17e-eab4-ab77-f7ab-311fc04066c2@ozlabs.ru> (raw)
In-Reply-To: <20190122170112.8706-4-farosas@linux.ibm.com>



On 23/01/2019 04:01, Fabiano Rosas wrote:
> This allows reading and writing of SPRs via GDB:
> 
> (gdb) p/x $srr1
> $1 = 0x8000000002803033
> 
> (gdb) p/x $pvr
> $2 = 0x4b0201
> (gdb) set $pvr=0x4b0000
> (gdb) p/x $pvr
> $3 = 0x4b0000
> 
> They can also be shown as a group:
> (gdb) info reg spr


This does not make much sense as 3 patches, one would do it; otherwise
if there is a problem with 1/3 or 2/3 - bisect will point to 3/3
although it does not actually add new code but enables other bits.


> 
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
>  target/ppc/translate_init.inc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
> index f29ac3558a..cba0303be2 100644
> --- a/target/ppc/translate_init.inc.c
> +++ b/target/ppc/translate_init.inc.c
> @@ -10531,7 +10531,9 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
>  #endif
>  
>      cc->gdb_num_core_regs = 71;
> -
> +#ifndef CONFIG_USER_ONLY
> +    cc->gdb_get_dynamic_xml = ppc_gdb_get_dynamic_xml;
> +#endif
>  #ifdef USE_APPLE_GDB
>      cc->gdb_read_register = ppc_cpu_gdb_read_register_apple;
>      cc->gdb_write_register = ppc_cpu_gdb_write_register_apple;
> 

-- 
Alexey

      reply	other threads:[~2019-01-24  7:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 17:01 [Qemu-devel] [PATCH v4 0/3] ppc/gdbstub: Expose SPRs to GDB Fabiano Rosas
2019-01-22 17:01 ` [Qemu-devel] [PATCH v4 1/3] target/ppc: Add SPRs XML generation code for gdbstub Fabiano Rosas
2019-01-24  6:34   ` Alexey Kardashevskiy
2019-01-22 17:01 ` [Qemu-devel] [PATCH v4 2/3] target/ppc: Add GDB callbacks for SPRs Fabiano Rosas
2019-01-24  7:20   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2019-01-26  1:50     ` David Gibson
2019-01-28 20:00       ` Fabiano Rosas
2019-01-29  0:28         ` Alexey Kardashevskiy
2019-01-30 16:30           ` Fabiano Rosas
2019-01-31  7:57             ` Alexey Kardashevskiy
2019-01-31 21:57               ` Fabiano Rosas
2019-02-01  4:02                 ` Alexey Kardashevskiy
2019-02-01 12:01                   ` Fabiano Rosas
2019-02-04  3:25                     ` Alexey Kardashevskiy
2019-01-22 17:01 ` [Qemu-devel] [PATCH v4 3/3] target/ppc: Enable reporting of SPRs to GDB Fabiano Rosas
2019-01-24  7:23   ` Alexey Kardashevskiy [this message]

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=d102e17e-eab4-ab77-f7ab-311fc04066c2@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).