qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 005/126] target-s390: Fix gdbstub


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 005/126] target-s390: Fix gdbstub
Date: Wed, 12 Sep 2012 08:11:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/12/2012 06:25 AM, Alexander Graf wrote:
>> +    case S390_PSWM_REGNUM:
>> +        env->psw.mask = tmpl;
>> +        env->cc_op = (tmpl >> 13) & 3;
> 
> Are you sure this is correct? I thought gdbstub would just ignore the cc bits.

Well... no it won't ignore the cc bits.  But it would appear that I've got
them at the wrong location.  From gdb/s390-tdep.c:

  if (regnum == tdep->cc_regnum)
    {
      enum register_status status;

      status = regcache_raw_read_unsigned (regcache, S390_PSWM_REGNUM, &val);
      if (status == REG_VALID)
        {
          if (register_size (gdbarch, S390_PSWA_REGNUM) == 4)
            val = (val >> 12) & 3;
          else
            val = (val >> 44) & 3;
          store_unsigned_integer (buf, regsize, byte_order, val);
        }
      return status;
    }


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]