Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch, arm] Consistent display of registers in corefile
Date: Thu, 13 Jan 2011 16:47:00 -0000	[thread overview]
Message-ID: <4D2F2BF9.8010103@codesourcery.com> (raw)
In-Reply-To: <201101131555.p0DFtdIs002421@d06av02.portsmouth.uk.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

On 01/13/2011 09:55 AM, Ulrich Weigand wrote:
> Yao Qi wrote:
>
>> FPS belongs to float_reggroup, save_reggroup, and restore_reggroup,
>> instead of float_reggroup only.
>
>> +  /* FPS register's type is INT, but belongs to float_reggroup,
>> +     save_regroup, and restore_reggroup.  */
>>     if (regnum == ARM_FPS_REGNUM)
>> -    return (group == float_reggroup);
>> +    return (group == float_reggroup
>> +	    || group == save_reggroup
>> +	    || group == restore_reggroup);
>>     else
>>       return default_register_reggroup_p (gdbarch, regnum, group);
>
> Well, FPS should also belong to all_reggroup, otherwise it wil not
> show up in "info all-registers" ...

OK, fix it in my new patch.

-- 
Yao Qi

[-- Attachment #2: fps_save_restore_reggroup.patch --]
[-- Type: text/x-patch, Size: 896 bytes --]

gdb/
	* arm-tdep.c (arm_register_reggroup_p): FPS register is in
	save_reggroup, restore_reggroup and all_reggroup.

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 9ec410d..e24a6d9 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -7234,9 +7234,14 @@ static int
 arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 			  struct reggroup *group)
 {
-  /* FPS register's type is INT, but belongs to float_group.  */
+  /* FPS register's type is INT, but belongs to float_reggroup.  Beside
+     this, FPS register belongs to save_regroup, restore_reggroup, and
+     all_reggroup, of course.  */
   if (regnum == ARM_FPS_REGNUM)
-    return (group == float_reggroup);
+    return (group == float_reggroup
+	    || group == save_reggroup
+	    || group == restore_reggroup
+	    || group == all_reggroup);
   else
     return default_register_reggroup_p (gdbarch, regnum, group);
 }

  reply	other threads:[~2011-01-13 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-10 13:37 Yao Qi
2010-12-10 14:46 ` Mark Kettenis
2010-12-10 15:07   ` Yao Qi
2010-12-13  2:57   ` Daniel Jacobowitz
2010-12-13 10:00     ` Yao Qi
2010-12-19 18:24       ` Daniel Jacobowitz
2010-12-20  2:29         ` Yao Qi
2010-12-20  3:09           ` Daniel Jacobowitz
2011-01-13 13:45 ` Yao Qi
2011-01-13 16:04   ` Ulrich Weigand
2011-01-13 16:47     ` Yao Qi [this message]
2011-01-14 16:52       ` Ulrich Weigand

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=4D2F2BF9.8010103@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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