public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Revert "gdb: Do not print empty-group regs when printing general ones"
@ 2020-03-04 16:13 Luis Machado
  0 siblings, 0 replies; only message in thread
From: Luis Machado @ 2020-03-04 16:13 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=440cf44eb0f70830b8d8ac35289f84129c7a35c1

commit 440cf44eb0f70830b8d8ac35289f84129c7a35c1
Author: Luis Machado <luis.machado@linaro.org>
Date:   Wed Mar 4 13:08:13 2020 -0300

    Revert "gdb: Do not print empty-group regs when printing general ones"
    
    Revert the change since it breaks existing behavior of "info registers"
    for some architectures. At least AArch64 and ARM are impacted by this change.
    
    gdb/ChangeLog:
    
    2020-03-04  Luis Machado  <luis.machado@linaro.org>
    
    	Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
    	in "info registers" for AArch64/ARM.
    
    	The change caused "info registers" to not print GPR's.
    
    	gdb/ChangeLog:
    
    	2020-02-01  Shahab Vahedi  <shahab@synopsys.com>
    
    	* target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
    	when reg->group is empty and reggroup is not.

Diff:
---
 gdb/ChangeLog             | 14 ++++++++++++++
 gdb/target-descriptions.c | 13 +++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index edb8781..36b3f3d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
+2020-03-04  Luis Machado  <luis.machado@linaro.org>
+
+	Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
+	in "info registers" for AArch64/ARM.
+
+	The change caused "info registers" to not print GPR's.
+
+	gdb/ChangeLog:
+
+	2020-02-01  Shahab Vahedi  <shahab@synopsys.com>
+
+	* target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
+	when reg->group is empty and reggroup is not.
+
 2020-03-03  Tom Tromey  <tromey@adacore.com>
 
 	* dwarf2/frame.c (struct dwarf2_frame_cache)
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 06f42a1..04711ba 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -977,16 +977,13 @@ tdesc_register_in_reggroup_p (struct gdbarch *gdbarch, int regno,
 {
   struct tdesc_reg *reg = tdesc_find_register (gdbarch, regno);
 
-  if (reg != NULL)
-    {
-      if (reggroup == all_reggroup)
+  if (reg != NULL && !reg->group.empty ()
+      && (reg->group == reggroup_name (reggroup)))
 	return 1;
 
-      else if (reggroup == save_reggroup || reggroup == restore_reggroup)
-	return reg->save_restore;
-      else
-	return (int) (reg->group == reggroup_name (reggroup));
-    }
+  if (reg != NULL
+      && (reggroup == save_reggroup || reggroup == restore_reggroup))
+    return reg->save_restore;
 
   return -1;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-04 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 16:13 [binutils-gdb] Revert "gdb: Do not print empty-group regs when printing general ones" Luis Machado

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