Hi Dave,
Control registers 8-15 (s390x and s390) and floating point registers 8-15
(s390x only) are not printed correctly because the we copy the content from
the wrong location of the save area.
Looks like nobody has realized this problem in the past because those
registers are not too important for debugging kernel problems...
This patch fixes this problem and now control and floating point registers
are printed correctly.
Signed-off-by: Michael Holzheu <holzheu(a)linux.vnet.ibm.com>
---
s390.c | 16 ++++++++--------
s390x.c | 32 ++++++++++++++++----------------
2 files changed, 24 insertions(+), 24 deletions(-)
--- 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);
+ tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
+ tmp[2]=ULONG(ptr + 10 * S390_WORD_SIZE);
+ tmp[3]=ULONG(ptr + 11 * S390_WORD_SIZE);
fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
- tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
- tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
- tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
- tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
+ tmp[0]=ULONG(ptr + 12 * S390_WORD_SIZE);
+ tmp[1]=ULONG(ptr + 13 * S390_WORD_SIZE);
+ tmp[2]=ULONG(ptr + 14 * S390_WORD_SIZE);
+ tmp[3]=ULONG(ptr + 15 * S390_WORD_SIZE);
fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
--- 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);
+ tmp[1]=ULONG(ptr + 9 * S390X_WORD_SIZE);
+ tmp[2]=ULONG(ptr + 10 * S390X_WORD_SIZE);
+ tmp[3]=ULONG(ptr + 11 * 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 + 4 * S390X_WORD_SIZE);
- tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
- tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
- tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
+ tmp[0]=ULONG(ptr + 12 * S390X_WORD_SIZE);
+ tmp[1]=ULONG(ptr + 13 * S390X_WORD_SIZE);
+ tmp[2]=ULONG(ptr + 14 * S390X_WORD_SIZE);
+ tmp[3]=ULONG(ptr + 15 * S390X_WORD_SIZE);
fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
@@ -1211,16 +1211,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 + 6 * S390X_WORD_SIZE);
- tmp[1]=ULONG(ptr + 7 * S390X_WORD_SIZE);
- tmp[2]=ULONG(ptr + 8 * S390X_WORD_SIZE);
- tmp[3]=ULONG(ptr + 9 * S390X_WORD_SIZE);
+ 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);
fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
- tmp[0]=ULONG(ptr + 10* S390X_WORD_SIZE);
- tmp[1]=ULONG(ptr + 11* S390X_WORD_SIZE);
- tmp[2]=ULONG(ptr + 12* S390X_WORD_SIZE);
- tmp[3]=ULONG(ptr + 13* S390X_WORD_SIZE);
+ tmp[0]=ULONG(ptr + 12 * S390X_WORD_SIZE);
+ tmp[1]=ULONG(ptr + 13 * S390X_WORD_SIZE);
+ tmp[2]=ULONG(ptr + 14 * S390X_WORD_SIZE);
+ tmp[3]=ULONG(ptr + 15 * S390X_WORD_SIZE);
fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
}