public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Improve CSKY arch support
@ 2021-07-15  7:22 Jiangshuai Li
  2021-07-15  7:22 ` [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name Jiangshuai Li
  0 siblings, 1 reply; 4+ messages in thread
From: Jiangshuai Li @ 2021-07-15  7:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: jiangshuai_li, lifang_xia, yunhai_shang

Hi, GDB Maintainers, CSKY arch was supported at commit
9d24df82ece4e87a0328173d6bd31cb9ff558bb4. 

It has been a long time since this Commit point occurred, during which time
CSKY has improved a lot of support for CSKY architecture, and we did not
synchronize these changes with the open source GDB. In the future, I will
divide these modification points into smaller patches for submission.

The patch submitted this time is only to fix the bug of CSKY Arch about
register viewing, which will be a start to improving the support of CSKY Arch.


Jiangshuai Li (1):
  gdb:csky rm tdesc_has_registers in csky_register_name

 gdb/csky-tdep.c | 3 ---
 1 file changed, 3 deletions(-)

-- 
2.17.1


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

* [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name
  2021-07-15  7:22 [PATCH 0/1] Improve CSKY arch support Jiangshuai Li
@ 2021-07-15  7:22 ` Jiangshuai Li
  2021-08-03 10:19   ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Jiangshuai Li @ 2021-07-15  7:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: jiangshuai_li, lifang_xia, yunhai_shang

As CSKY arch has not parsed target-description.xml in csky_gdbarch_init,
when a remote server, like csky-qemu or gdbserver, send a target-description.xml
to gdb, tdesc_has_registers will return ture, but tdesc_register_name (gdbarch, 0)
will return NULL, so a cmd "info registers r0" will not work.

Function of parsing target-description.xml will be add later for CSKY arch,
now it is temporarily removed to allow me to do other supported tests.

2021-07-15 Jiangshuai Li  <jiangshuai_li@c-sky.com>

            * csky-tdep.c : not using tdesc funtions in csky_register_name
---
 gdb/csky-tdep.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index 5940429e192..657ba75d080 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -235,9 +235,6 @@ static const char * const csky_register_names[] =
 static const char *
 csky_register_name (struct gdbarch *gdbarch, int reg_nr)
 {
-  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
-    return tdesc_register_name (gdbarch, reg_nr);
-
   if (reg_nr < 0)
     return NULL;
 
-- 
2.17.1


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

* Re: [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name
  2021-07-15  7:22 ` [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name Jiangshuai Li
@ 2021-08-03 10:19   ` Andrew Burgess
  2021-08-12  8:51     ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2021-08-03 10:19 UTC (permalink / raw)
  To: Jiangshuai Li; +Cc: gdb-patches, yunhai_shang, lifang_xia

* Jiangshuai Li <jiangshuai_li@c-sky.com> [2021-07-15 15:22:11 +0800]:

> As CSKY arch has not parsed target-description.xml in csky_gdbarch_init,
> when a remote server, like csky-qemu or gdbserver, send a target-description.xml
> to gdb, tdesc_has_registers will return ture, but tdesc_register_name (gdbarch, 0)
> will return NULL, so a cmd "info registers r0" will not work.
> 
> Function of parsing target-description.xml will be add later for CSKY arch,
> now it is temporarily removed to allow me to do other supported tests.
> 
> 2021-07-15 Jiangshuai Li  <jiangshuai_li@c-sky.com>
> 
>             * csky-tdep.c : not using tdesc funtions in csky_register_name

LGTM.  Please go ahead an commit.

Thanks,
Andrew

> ---
>  gdb/csky-tdep.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
> index 5940429e192..657ba75d080 100644
> --- a/gdb/csky-tdep.c
> +++ b/gdb/csky-tdep.c
> @@ -235,9 +235,6 @@ static const char * const csky_register_names[] =
>  static const char *
>  csky_register_name (struct gdbarch *gdbarch, int reg_nr)
>  {
> -  if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
> -    return tdesc_register_name (gdbarch, reg_nr);
> -
>    if (reg_nr < 0)
>      return NULL;
>  
> -- 
> 2.17.1
> 

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

* Re: [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name
  2021-08-03 10:19   ` Andrew Burgess
@ 2021-08-12  8:51     ` Andrew Burgess
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2021-08-12  8:51 UTC (permalink / raw)
  To: Jiangshuai Li; +Cc: gdb-patches, yunhai_shang, lifang_xia

* Andrew Burgess <andrew.burgess@embecosm.com> [2021-08-03 11:19:03 +0100]:

> * Jiangshuai Li <jiangshuai_li@c-sky.com> [2021-07-15 15:22:11 +0800]:
> 
> > As CSKY arch has not parsed target-description.xml in csky_gdbarch_init,
> > when a remote server, like csky-qemu or gdbserver, send a target-description.xml
> > to gdb, tdesc_has_registers will return ture, but tdesc_register_name (gdbarch, 0)
> > will return NULL, so a cmd "info registers r0" will not work.
> > 
> > Function of parsing target-description.xml will be add later for CSKY arch,
> > now it is temporarily removed to allow me to do other supported tests.
> > 
> > 2021-07-15 Jiangshuai Li  <jiangshuai_li@c-sky.com>
> > 
> >             * csky-tdep.c : not using tdesc funtions in csky_register_name
> 
> LGTM.  Please go ahead an commit.

Jiangshuai Li,

I went ahead an pushed this patch as it is small/obvious.  I don't
know if you have a copyright assignment in place, if you don't you
will need to get one before any larger patches can be merged.  See
here for more details:

  https://sourceware.org/gdb/wiki/ContributionChecklist#FSF_copyright_Assignment

Thanks,
Andrew

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

end of thread, other threads:[~2021-08-12  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15  7:22 [PATCH 0/1] Improve CSKY arch support Jiangshuai Li
2021-07-15  7:22 ` [PATCH 1/1] gdb:csky rm tdesc_has_registers in csky_register_name Jiangshuai Li
2021-08-03 10:19   ` Andrew Burgess
2021-08-12  8:51     ` Andrew Burgess

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).