Re: [PATCH] s390: Fix printing of control and floating point registers

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

 



Hello Dave,

On Thu, 2011-09-15 at 11:24 -0400, Dave Anderson wrote:
> Hi Michael,
> 
> The "ULONG(ptr + 8)" below doesn't seem right:

You are right of course, thanks! At least I did the error
consistently :-)

> 
> > --- a/s390.c
> > +++ b/s390.c
> > @@ -861,16 +861,16 @@ s390_print_lowcore(char* lc, struct bt_i
> > fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
> > tmp[0], tmp[1], tmp[2], tmp[3]);
> > 
> > - tmp[0]=ULONG(ptr);
> > - tmp[1]=ULONG(ptr + S390_WORD_SIZE);
> > - tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
> > - tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
> > + tmp[0]=ULONG(ptr + 8);

Should be tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);

> > + tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
> > + tmp[2]=ULONG(ptr + 10 * S390_WORD_SIZE);
> > + tmp[3]=ULONG(ptr + 11 * S390_WORD_SIZE);
> 
> And here as well:
> 
> > --- a/s390x.c
> > +++ b/s390x.c
> > @@ -1184,16 +1184,16 @@ s390x_print_lowcore(char* lc, struct bt_
> > tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
> > fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
> > fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
> > - tmp[0]=ULONG(ptr);
> > - tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
> > - tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
> > - tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
> > + tmp[0]=ULONG(ptr + 8);

And tmp[0]=ULONG(ptr + 8 * S390X_WORD_SIZE);

> > + tmp[1]=ULONG(ptr + 9 * S390X_WORD_SIZE);
> > + tmp[2]=ULONG(ptr + 10 * S390X_WORD_SIZE);
> > + tmp[3]=ULONG(ptr + 11 * S390X_WORD_SIZE);
> 
> Shouldn't they both be:
> 
>   tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);

Yes, but S390X_WORD_SIZE for s390x.

Could you change that?

Thanks
Michael

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux