* [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu
@ 2017-09-22 10:39 Abhijit Ray Chaudhury
2017-09-22 10:53 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Abhijit Ray Chaudhury @ 2017-09-22 10:39 UTC (permalink / raw)
To: qemu-devel
Hi,
I want to view ARM CP15 register sets via gdb when I am emulating arm.
However I only see ARM Core Register Sets and NEON registers through
gdb interface.
Can you please let me know how to add cp15 register set support using
gdb interface in qemu.
Thanks in advance,
-Abhijit
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu
2017-09-22 10:39 [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu Abhijit Ray Chaudhury
@ 2017-09-22 10:53 ` Peter Maydell
2017-09-22 15:11 ` Abhijit Ray Chaudhury
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2017-09-22 10:53 UTC (permalink / raw)
To: Abhijit Ray Chaudhury; +Cc: QEMU Developers
On 22 September 2017 at 11:39, Abhijit Ray Chaudhury
<abhijit.ray.chaudhury@gmail.com> wrote:
> I want to view ARM CP15 register sets via gdb when I am emulating arm.
> However I only see ARM Core Register Sets and NEON registers through
> gdb interface.
>
> Can you please let me know how to add cp15 register set support using
> gdb interface in qemu.
This isn't currently implemented in QEMU, though it would be a
nice idea. We have wishlist bug https://bugs.launchpad.net/qemu/+bug/741115
about this, though that was filed in 2011 which will give you an
idea of how likely it is to be implemented.
The implementation would be moderately but not insanely complex:
we would need to generate XML in the gdbstub that describes the
registers by enumerating them in the cpreg hashtable. Hopefully
gdb would then be able to handle the registers we describe to
it that way. Likely pitfalls along the way:
* our gdbstub currently breaks if the XML fragment is too large,
so that bug would need to be fixed first
* The coprocessor register descriptions currently assume things
like the register name string are for debug purposes only,
so there are probably duplicate names or otherwise unhelpful
things in there -- these would need to be located and fixed
I thought I remembered somebody talking about having a go at
implementing this, but I can't find anything with a search through
the qemu-devel mail archive, so I guess I'm mistaken.
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu
2017-09-22 10:53 ` Peter Maydell
@ 2017-09-22 15:11 ` Abhijit Ray Chaudhury
2017-09-22 15:14 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Abhijit Ray Chaudhury @ 2017-09-22 15:11 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
Hi Peter,
Thanks for your prompt response. I have gone through target
description xml format for gdb
(https://sourceware.org/gdb//onlinedocs/gdb/ARM-Features.html#ARM-Features)
. I could not find a feature description matching cp15 registers.So
even if I implement some subset of it would gdb understand it ? Can I
randomly name SCTLR TTBR0 etc and gdb understand it ?
Thanking You,
-Abhijit
On Fri, Sep 22, 2017 at 4:23 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 22 September 2017 at 11:39, Abhijit Ray Chaudhury
> <abhijit.ray.chaudhury@gmail.com> wrote:
>> I want to view ARM CP15 register sets via gdb when I am emulating arm.
>> However I only see ARM Core Register Sets and NEON registers through
>> gdb interface.
>>
>> Can you please let me know how to add cp15 register set support using
>> gdb interface in qemu.
>
> This isn't currently implemented in QEMU, though it would be a
> nice idea. We have wishlist bug https://bugs.launchpad.net/qemu/+bug/741115
> about this, though that was filed in 2011 which will give you an
> idea of how likely it is to be implemented.
>
> The implementation would be moderately but not insanely complex:
> we would need to generate XML in the gdbstub that describes the
> registers by enumerating them in the cpreg hashtable. Hopefully
> gdb would then be able to handle the registers we describe to
> it that way. Likely pitfalls along the way:
> * our gdbstub currently breaks if the XML fragment is too large,
> so that bug would need to be fixed first
> * The coprocessor register descriptions currently assume things
> like the register name string are for debug purposes only,
> so there are probably duplicate names or otherwise unhelpful
> things in there -- these would need to be located and fixed
>
> I thought I remembered somebody talking about having a go at
> implementing this, but I can't find anything with a search through
> the qemu-devel mail archive, so I guess I'm mistaken.
>
> thanks
> -- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu
2017-09-22 15:11 ` Abhijit Ray Chaudhury
@ 2017-09-22 15:14 ` Peter Maydell
2017-09-26 17:32 ` Alistair Francis
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2017-09-22 15:14 UTC (permalink / raw)
To: Abhijit Ray Chaudhury; +Cc: QEMU Developers
On 22 September 2017 at 16:11, Abhijit Ray Chaudhury
<abhijit.ray.chaudhury@gmail.com> wrote:
> Hi Peter,
>
> Thanks for your prompt response. I have gone through target
> description xml format for gdb
> (https://sourceware.org/gdb//onlinedocs/gdb/ARM-Features.html#ARM-Features)
> . I could not find a feature description matching cp15 registers.So
> even if I implement some subset of it would gdb understand it ? Can I
> randomly name SCTLR TTBR0 etc and gdb understand it ?
Yes, that's the sort of question you'd need to investigate and
answer to implement this feature :-)
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu
2017-09-22 15:14 ` Peter Maydell
@ 2017-09-26 17:32 ` Alistair Francis
0 siblings, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2017-09-26 17:32 UTC (permalink / raw)
To: Peter Maydell; +Cc: Abhijit Ray Chaudhury, QEMU Developers
On Fri, Sep 22, 2017 at 8:14 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 22 September 2017 at 16:11, Abhijit Ray Chaudhury
> <abhijit.ray.chaudhury@gmail.com> wrote:
>> Hi Peter,
>>
>> Thanks for your prompt response. I have gone through target
>> description xml format for gdb
>> (https://sourceware.org/gdb//onlinedocs/gdb/ARM-Features.html#ARM-Features)
>> . I could not find a feature description matching cp15 registers.So
>> even if I implement some subset of it would gdb understand it ? Can I
>> randomly name SCTLR TTBR0 etc and gdb understand it ?
>
> Yes, that's the sort of question you'd need to investigate and
> answer to implement this feature :-)
If it helps your investigation we have a little bit of what you are
looking for implemented in our fork. You can see the XML that we
expose here: https://github.com/Xilinx/qemu/blob/master/gdb-xml/aarch64-el3.xml
Our GDB stub is pretty divergent though, we are working on trying to
improve it, but it's slow going.
Thanks,
Alistair
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-26 17:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 10:39 [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu Abhijit Ray Chaudhury
2017-09-22 10:53 ` Peter Maydell
2017-09-22 15:11 ` Abhijit Ray Chaudhury
2017-09-22 15:14 ` Peter Maydell
2017-09-26 17:32 ` Alistair Francis
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).