public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] aarch64/gdbserver: fix floating point registers display
@ 2014-08-22  6:59 Catalin Udma
  2014-09-02 13:36 ` Marcus Shawcroft
  2014-09-02 13:47 ` Marcus Shawcroft
  0 siblings, 2 replies; 6+ messages in thread
From: Catalin Udma @ 2014-08-22  6:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Catalin Udma

When using aarch64 gdb with gdbserver, floating point registers are
not correctly displayed, as below:
  (gdb) info registers fpsr fpcr
  fpsr           <unavailable>
  fpcr           <unavailable>

To fix these problems, the missing fpsr and fpcr registers are added
when floating point registers are read/write

gdb/gdbserver/
2014-08-12  Catalin Udma  <catalin.udma@freescale.com>

        * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
        (AARCH64_FPCR_REGNO): Likewise.
        (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
        (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
        (aarch64_store_fpregset): Likewise.
---
 gdb/gdbserver/linux-aarch64-low.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 6066e15..3453b2e 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -46,8 +46,10 @@ extern const struct target_desc *tdesc_aarch64;
 #define AARCH64_PC_REGNO   32
 #define AARCH64_CPSR_REGNO 33
 #define AARCH64_V0_REGNO   34
+#define AARCH64_FPSR_REGNO (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM)
+#define AARCH64_FPCR_REGNO (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM + 1)
 
-#define AARCH64_NUM_REGS (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM)
+#define AARCH64_NUM_REGS (AARCH64_V0_REGNO + AARCH64_V_REGS_NUM + 2)
 
 static int
 aarch64_regmap [] =
@@ -255,6 +257,8 @@ aarch64_fill_fpregset (struct regcache *regcache, void *buf)
 
   for (i = 0; i < AARCH64_V_REGS_NUM; i++)
     collect_register (regcache, AARCH64_V0_REGNO + i, &regset->vregs[i]);
+  collect_register (regcache, AARCH64_FPSR_REGNO, &regset->fpsr);
+  collect_register (regcache, AARCH64_FPCR_REGNO, &regset->fpcr);
 }
 
 static void
@@ -265,6 +269,8 @@ aarch64_store_fpregset (struct regcache *regcache, const void *buf)
 
   for (i = 0; i < AARCH64_V_REGS_NUM; i++)
     supply_register (regcache, AARCH64_V0_REGNO + i, &regset->vregs[i]);
+  supply_register (regcache, AARCH64_FPSR_REGNO, &regset->fpsr);
+  supply_register (regcache, AARCH64_FPCR_REGNO, &regset->fpcr);
 }
 
 /* Debugging of hardware breakpoint/watchpoint support.  */
-- 
1.7.8

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] aarch64/gdbserver: fix floating point registers display
  2014-08-22  6:59 [PATCH v2] aarch64/gdbserver: fix floating point registers display Catalin Udma
@ 2014-09-02 13:36 ` Marcus Shawcroft
  2014-09-02 13:42   ` catalin.udma
  2014-09-02 13:47 ` Marcus Shawcroft
  1 sibling, 1 reply; 6+ messages in thread
From: Marcus Shawcroft @ 2014-09-02 13:36 UTC (permalink / raw)
  To: Catalin Udma; +Cc: gdb-patches

On 22 August 2014 07:54, Catalin Udma <catalin.udma@freescale.com> wrote:
> When using aarch64 gdb with gdbserver, floating point registers are
> not correctly displayed, as below:
>   (gdb) info registers fpsr fpcr
>   fpsr           <unavailable>
>   fpcr           <unavailable>
>
> To fix these problems, the missing fpsr and fpcr registers are added
> when floating point registers are read/write
>
> gdb/gdbserver/
> 2014-08-12  Catalin Udma  <catalin.udma@freescale.com>
>
>         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
>         (AARCH64_FPCR_REGNO): Likewise.
>         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
>         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
>         (aarch64_store_fpregset): Likewise.


Does this version of the patch assume that
https://sourceware.org/ml/gdb-patches/2013-12/msg00720.html has been
reverted?

Cheers
/Marcus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] aarch64/gdbserver: fix floating point registers display
  2014-09-02 13:36 ` Marcus Shawcroft
@ 2014-09-02 13:42   ` catalin.udma
  0 siblings, 0 replies; 6+ messages in thread
From: catalin.udma @ 2014-09-02 13:42 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gdb-patches

 
> Does this version of the patch assume that
> https://sourceware.org/ml/gdb-patches/2013-12/msg00720.html has been
> reverted?
> 
> Cheers
> /Marcus
[Catalin Udma] Yes, it assumes that the patch has been reverted.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] aarch64/gdbserver: fix floating point registers display
  2014-08-22  6:59 [PATCH v2] aarch64/gdbserver: fix floating point registers display Catalin Udma
  2014-09-02 13:36 ` Marcus Shawcroft
@ 2014-09-02 13:47 ` Marcus Shawcroft
  2014-09-02 14:12   ` Pedro Alves
  1 sibling, 1 reply; 6+ messages in thread
From: Marcus Shawcroft @ 2014-09-02 13:47 UTC (permalink / raw)
  To: Catalin Udma; +Cc: gdb-patches

On 22 August 2014 07:54, Catalin Udma <catalin.udma@freescale.com> wrote:
> When using aarch64 gdb with gdbserver, floating point registers are
> not correctly displayed, as below:
>   (gdb) info registers fpsr fpcr
>   fpsr           <unavailable>
>   fpcr           <unavailable>
>
> To fix these problems, the missing fpsr and fpcr registers are added
> when floating point registers are read/write
>
> gdb/gdbserver/
> 2014-08-12  Catalin Udma  <catalin.udma@freescale.com>
>
>         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
>         (AARCH64_FPCR_REGNO): Likewise.
>         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
>         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
>         (aarch64_store_fpregset): Likewise.

This looks good to me.... and I agree with the views expressed
elsewhere in this list that
https://sourceware.org/ml/gdb-patches/2013-12/msg00720.html should be
reverted pending a proper solution for BE.

.. however... I can't approve your patch here in gdb land.

Cheers
/Marcus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] aarch64/gdbserver: fix floating point registers display
  2014-09-02 13:47 ` Marcus Shawcroft
@ 2014-09-02 14:12   ` Pedro Alves
  2014-09-16 14:00     ` catalin.udma
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2014-09-02 14:12 UTC (permalink / raw)
  To: Marcus Shawcroft, Catalin Udma; +Cc: gdb-patches

On 09/02/2014 02:47 PM, Marcus Shawcroft wrote:

>> gdb/gdbserver/
>> 2014-08-12  Catalin Udma  <catalin.udma@freescale.com>
>>
>>         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
>>         (AARCH64_FPCR_REGNO): Likewise.
>>         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
>>         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
>>         (aarch64_store_fpregset): Likewise.
> 
> This looks good to me.... 

> .. however... I can't approve your patch here in gdb land.

<rubberstamp> OK </rubberstamp>

Please push.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] aarch64/gdbserver: fix floating point registers display
  2014-09-02 14:12   ` Pedro Alves
@ 2014-09-16 14:00     ` catalin.udma
  0 siblings, 0 replies; 6+ messages in thread
From: catalin.udma @ 2014-09-16 14:00 UTC (permalink / raw)
  To: Pedro Alves, Marcus Shawcroft; +Cc: gdb-patches


> On 09/02/2014 02:47 PM, Marcus Shawcroft wrote:
> >> gdb/gdbserver/
> >> 2014-08-12  Catalin Udma  <catalin.udma@freescale.com>
> >>
> >>         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
> >>         (AARCH64_FPCR_REGNO): Likewise.
> >>         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
> >>         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
> >>         (aarch64_store_fpregset): Likewise.
> >
> > This looks good to me....
> > .. however... I can't approve your patch here in gdb land.
> 
> <rubberstamp> OK </rubberstamp>
> 
> Please push.
> 
> Thanks,
> Pedro Alves
[Catalin Udma] Are there any updates with this patch?
I see it's not pushed on master.
Thanks,
Catalin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-16 14:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22  6:59 [PATCH v2] aarch64/gdbserver: fix floating point registers display Catalin Udma
2014-09-02 13:36 ` Marcus Shawcroft
2014-09-02 13:42   ` catalin.udma
2014-09-02 13:47 ` Marcus Shawcroft
2014-09-02 14:12   ` Pedro Alves
2014-09-16 14:00     ` catalin.udma

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 read-only IMAP folder(s) and NNTP newsgroup(s).