[1/2] C-SKY Port

Message ID c0d42b31-225f-6efc-4433-6ff4247dcd3e@mentor.com
State New, archived
Headers

Commit Message

Hafiz Abid Qadeer Oct. 23, 2018, 10:30 p.m. UTC
  On 23/10/18 17:42, Simon Marchi wrote:
> On 2018-10-23 08:48, Hafiz Abid Qadeer wrote:
>>> A quick investigation shows it's because some raw registers are not
>>> in the
>>> save reggroup.  So csky should probably be added to that big if in
>>> the test:
>>>
>>>       if (bfd_arch == bfd_arch_frv || bfd_arch == bfd_arch_h8300
>>>           || bfd_arch == bfd_arch_m32c || bfd_arch == bfd_arch_sh
>>>           || bfd_arch == bfd_arch_alpha || bfd_arch == bfd_arch_v850
>>>           || bfd_arch == bfd_arch_msp430 || bfd_arch == bfd_arch_mep
>>>           || bfd_arch == bfd_arch_mips || bfd_arch ==
>>> bfd_arch_v850_rh850
>>>           || bfd_arch == bfd_arch_tic6x || bfd_arch == bfd_arch_mn10300
>>>           || bfd_arch == bfd_arch_rl78 || bfd_arch == bfd_arch_score
>>>           || bfd_arch == bfd_arch_riscv)
>>>         {
>>>           /* Raw registers.  If raw registers are not in save_reggroup,
>>>          their status are unknown.  */
>>>           if (gdbarch_register_reggroup_p (gdbarch, regnum,
>>> save_reggroup))
>>>         SELF_CHECK (status == REG_VALID);
>>>           else
>>>         SELF_CHECK (status == REG_UNKNOWN);
>>>         }
>>>       else
>>>         SELF_CHECK (status == REG_VALID);
>>>
>>
>> When I was reviewing the test results for csky, I saw this fail in
>> unittest.exp and fixed it by adding csky to the big if list as you
>> mentioned above. Somehow I missed that patch when upstreaming the port.
>> So if you are happy with that change then I will push it.
> 
> Yes please, consider it pre-approved.  We can take a look at removing
> the big list laster.

I pushed the following patch.

gdb/ChangeLog:
2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* regcache.c (cooked_read_test): Add CSKY to the list of
	architectures with a save_reggroup

--


Thanks,
  

Patch

diff --git a/gdb/regcache.c b/gdb/regcache.c
index 38ad7ba3f1..946035ae67 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1679,7 +1679,7 @@  cooked_read_test (struct gdbarch *gdbarch)
 	      || bfd_arch == bfd_arch_mips || bfd_arch == bfd_arch_v850_rh850
 	      || bfd_arch == bfd_arch_tic6x || bfd_arch == bfd_arch_mn10300
 	      || bfd_arch == bfd_arch_rl78 || bfd_arch == bfd_arch_score
-	      || bfd_arch == bfd_arch_riscv)
+	      || bfd_arch == bfd_arch_riscv || bfd_arch == bfd_arch_csky)
 	    {
 	      /* Raw registers.  If raw registers are not in save_reggroup,
 		 their status are unknown.  */