[Crash-utility] 答复: [External Mail]Re: [PATCH] arm64: gdb stack unwind append more registers

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

 



attached.

发件人: lijiang <lijiang@xxxxxxxxxx>
发送时间: 2024年12月5日 17:07:18
收件人: devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
主题: [External Mail][Crash-utility] Re: [PATCH] arm64: gdb stack unwind append more registers
 

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xxxxxxxxxx进行反馈

On Wed, Nov 6, 2024 at 10:41 AM <devel-request@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Date: Wed, 6 Nov 2024 10:37:22 +0800
From: Guanyou Chen <chenguanyou9338@xxxxxxxxx>
Subject: [Crash-utility] [PATCH] arm64: gdb stack unwind append more
        registers
To: Lianbo <lijiang@xxxxxxxxxx>, Tao Liu <ltao@xxxxxxxxxx>,
        devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
Message-ID:
        <CAHS3RMVgR5aoC99hwJeBGxfHn8JWakJTib8C+wfJD88aCMRWPw@xxxxxxxxxxxxxx>
Content-Type: multipart/mixed; boundary="00000000000061369a06263566c3"

--00000000000061369a06263566c3
Content-Type: multipart/alternative; boundary="00000000000061369906263566c1"

--00000000000061369906263566c1
Content-Type: text/plain; charset="UTF-8"

Hi  Lianbo,  Tao

Let gdb fetch_registers include cpu context x19~x28,
This may not mean for already scheduled tasks, but
gdb stack unwind show more args.

Before:
    crash> gdb bt
    #0  __switch_to (prev=<unavailable>, prev@entry=0xffffff80025f0000,
next=next@entry=<unavailable>) at arch/arm64/kernel/process.c:566
    #1  0xffffffc008f820b8 in context_switch (rq=0xffffff81fcf419c0,
prev=0xffffff80025f0000, next=<unavailable>, rf=<optimized out>) at
kernel/sched/core.c:5471
    #2  __schedule (sched_mode=<optimized out>, sched_mode@entry=168999904)
at kernel/sched/core.c:6857
    #3  0xffffffc008f82514 in schedule () at kernel/sched/core.c:6933
    ...

After:
    crash> gdb bt
    #0  __switch_to (prev=prev@entry=0xffffff80025f0000,
next=next@entry=0xffffff80026092c0)
at arch/arm64/kernel/process.c:566
    #1  0xffffffc008f820b8 in context_switch (rq=0xffffff81fcf419c0,
prev=0xffffff80025f0000, next=0xffffff80026092c0, rf=<optimized out>) at
kernel/sched/core.c:5471
    #2  __schedule (sched_mode=<optimized out>, sched_mode@entry=168999904)
at kernel/sched/core.c:6857
    #3  0xffffffc008f82514 in schedule () at kernel/sched/core.c:6933
    ...

Signed-off-by: Guanyou.Chen <chenguanyou@xxxxxxxxxx>
---
 arm64.c   | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 defs.h    | 20 +++++++++++++++++
 symbols.c | 32 ++++++++++++++++++++++-----
 3 files changed, 110 insertions(+), 8 deletions(-)

Hi, Guanyou

Thank you for the patch.  I can not apply this one in my local git repo. Could you please double check?

$ git apply this.patch
error: corrupt patch at line 114
 
BTW: I haven't looked at the code yet.

Thanks
Lianbo

diff --git a/arm64.c b/arm64.c
index 4521b45..86dc341 100644
--- a/arm64.c
+++ b/arm64.c
@@ -2731,6 +2731,9 @@ arm64_stackframe_init(void)
  long thread_struct_cpu_context;
  long context_sp, context_pc, context_fp;
  struct syment *sp1, *sp1n, *sp2, *sp2n, *sp3, *sp3n;
+ long context_x19, context_x20, context_x21, context_x22;
+ long context_x23, context_x24, context_x25, context_x26;
+ long context_x27, context_x28;

  STRUCT_SIZE_INIT(note_buf, "note_buf_t");
  STRUCT_SIZE_INIT(elf_prstatus, "elf_prstatus");
@@ -2814,6 +2817,16 @@ arm64_stackframe_init(void)
  context_sp = MEMBER_OFFSET("cpu_context", "sp");
  context_fp = MEMBER_OFFSET("cpu_context", "fp");
  context_pc = MEMBER_OFFSET("cpu_context", "pc");
+ context_x19 = MEMBER_OFFSET("cpu_context", "x19");
+ context_x20 = MEMBER_OFFSET("cpu_context", "x20");
+ context_x21 = MEMBER_OFFSET("cpu_context", "x21");
+ context_x22 = MEMBER_OFFSET("cpu_context", "x22");
+ context_x23 = MEMBER_OFFSET("cpu_context", "x23");
+ context_x24 = MEMBER_OFFSET("cpu_context", "x24");
+ context_x25 = MEMBER_OFFSET("cpu_context", "x25");
+ context_x26 = MEMBER_OFFSET("cpu_context", "x26");
+ context_x27 = MEMBER_OFFSET("cpu_context", "x27");
+ context_x28 = MEMBER_OFFSET("cpu_context", "x28");
  if (context_sp == INVALID_OFFSET) {
  error(INFO, "cannot determine cpu_context.sp offset\n");
  return;
@@ -2832,6 +2845,26 @@ arm64_stackframe_init(void)
  task_struct_thread + thread_struct_cpu_context + context_fp;
  ASSIGN_OFFSET(task_struct_thread_context_pc) =
  task_struct_thread + thread_struct_cpu_context + context_pc;
+ ASSIGN_OFFSET(task_struct_thread_context_x19) =
+ task_struct_thread + thread_struct_cpu_context + context_x19;
+ ASSIGN_OFFSET(task_struct_thread_context_x20) =
+ task_struct_thread + thread_struct_cpu_context + context_x20;
+ ASSIGN_OFFSET(task_struct_thread_context_x21) =
+ task_struct_thread + thread_struct_cpu_context + context_x21;
+ ASSIGN_OFFSET(task_struct_thread_context_x22) =
+ task_struct_thread + thread_struct_cpu_context + context_x22;
+ ASSIGN_OFFSET(task_struct_thread_context_x23) =
+ task_struct_thread + thread_struct_cpu_context + context_x23;
+ ASSIGN_OFFSET(task_struct_thread_context_x24) =
+ task_struct_thread + thread_struct_cpu_context + context_x24;
+ ASSIGN_OFFSET(task_struct_thread_context_x25) =
+ task_struct_thread + thread_struct_cpu_context + context_x25;
+ ASSIGN_OFFSET(task_struct_thread_context_x26) =
+ task_struct_thread + thread_struct_cpu_context + context_x26;
+ ASSIGN_OFFSET(task_struct_thread_context_x27) =
+ task_struct_thread + thread_struct_cpu_context + context_x27;
+ ASSIGN_OFFSET(task_struct_thread_context_x28) =
+ task_struct_thread + thread_struct_cpu_context + context_x28;
 }

 #define KERNEL_MODE (1)
@@ -4256,6 +4289,16 @@ arm64_get_stackframe(struct bt_info *bt, struct
arm64_stackframe *frame)
  frame->sp = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_sp));
  frame->pc = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_pc));
  frame->fp = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_fp));
+ frame->x19 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x19));
+ frame->x20 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x20));
+ frame->x21 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x21));
+ frame->x22 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x22));
+ frame->x23 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x23));
+ frame->x24 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x24));
+ frame->x25 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x25));
+ frame->x26 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x26));
+ frame->x27 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x27));
+ frame->x28 = ULONG(tt->task_struct +
OFFSET(task_struct_thread_context_x28));

  return TRUE;
 }
@@ -4280,10 +4323,29 @@ arm64_get_stack_frame(struct bt_info *bt, ulong
*pcp, ulong *spp)
  ur_bitmap->ur.pc = stackframe.pc;
  ur_bitmap->ur.sp = stackframe.sp;
  ur_bitmap->ur.regs[29] = stackframe.fp;
+ ur_bitmap->ur.regs[28] = stackframe.x28;
+ ur_bitmap->ur.regs[27] = stackframe.x27;
+ ur_bitmap->ur.regs[26] = stackframe.x26;
+ ur_bitmap->ur.regs[25] = stackframe.x25;
+ ur_bitmap->ur.regs[24] = stackframe.x24;
+ ur_bitmap->ur.regs[23] = stackframe.x23;
+ ur_bitmap->ur.regs[22] = stackframe.x22;
+ ur_bitmap->ur.regs[21] = stackframe.x21;
+ ur_bitmap->ur.regs[20] = stackframe.x20;
+ ur_bitmap->ur.regs[19] = stackframe.x19;
  SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, pc));
  SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, sp));
- SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0])
- + X29_REGNUM - X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X29_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X28_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X27_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X26_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X25_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X24_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X23_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X22_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X21_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X20_REGNUM -
X0_REGNUM);
+ SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X19_REGNUM -
X0_REGNUM);
  bt->machdep = ur_bitmap;
  bt->need_free = TRUE;
  }
diff --git a/defs.h b/defs.h
index 0f70827..191b394 100644
--- a/defs.h
+++ b/defs.h
@@ -2010,6 +2010,16 @@ struct offset_table {                    /* stash of
commonly-used offsets */
  long tnt_bit;
  long tnt_true;
  long tnt_false;
+ long task_struct_thread_context_x19;
+ long task_struct_thread_context_x20;
+ long task_struct_thread_context_x21;
+ long task_struct_thread_context_x22;
+ long task_struct_thread_context_x23;
+ long task_struct_thread_context_x24;
+ long task_struct_thread_context_x25;
+ long task_struct_thread_context_x26;
+ long task_struct_thread_context_x27;
+ long task_struct_thread_context_x28;
  long task_struct_thread_context_fp;
  long task_struct_thread_context_sp;
  long task_struct_thread_context_pc;
@@ -3593,6 +3603,16 @@ struct machine_specific {
 };

 struct arm64_stackframe {
+        unsigned long x19;
+        unsigned long x20;
+        unsigned long x21;
+        unsigned long x22;
+        unsigned long x23;
+        unsigned long x24;
+        unsigned long x25;
+        unsigned long x26;
+        unsigned long x27;
+        unsigned long x28;
         unsigned long fp;
         unsigned long sp;
         unsigned long pc;
diff --git a/symbols.c b/symbols.c
index f68cf0b..93ddf5a 100644
--- a/symbols.c
+++ b/symbols.c
@@ -9829,12 +9829,32 @@ dump_offset_table(char *spec, ulong makestruct)
                 OFFSET(task_struct_thread_reg29));
         fprintf(fp, "      task_struct_thread_reg31: %ld\n",
                 OFFSET(task_struct_thread_reg31));
- fprintf(fp, " task_struct_thread_context_fp: %ld\n",
- OFFSET(task_struct_thread_context_fp));
- fprintf(fp, " task_struct_thread_context_sp: %ld\n",
- OFFSET(task_struct_thread_context_sp));
- fprintf(fp, " task_struct_thread_context_pc: %ld\n",
- OFFSET(task_struct_thread_context_pc));
+        fprintf(fp, " task_struct_thread_context_x19: %ld\n",
+                OFFSET(task_struct_thread_context_x19));
+        fprintf(fp, " task_struct_thread_context_x20: %ld\n",
+                OFFSET(task_struct_thread_context_x20));
+        fprintf(fp, " task_struct_thread_context_x21: %ld\n",
+                OFFSET(task_struct_thread_context_x21));
+        fprintf(fp, " task_struct_thread_context_x22: %ld\n",
+                OFFSET(task_struct_thread_context_x22));
+        fprintf(fp, " task_struct_thread_context_x23: %ld\n",
+                OFFSET(task_struct_thread_context_x23));
+        fprintf(fp, " task_struct_thread_context_x24: %ld\n",
+                OFFSET(task_struct_thread_context_x24));
+        fprintf(fp, " task_struct_thread_context_x25: %ld\n",
+                OFFSET(task_struct_thread_context_x25));
+        fprintf(fp, " task_struct_thread_context_x26: %ld\n",
+                OFFSET(task_struct_thread_context_x26));
+        fprintf(fp, " task_struct_thread_context_x27: %ld\n",
+                OFFSET(task_struct_thread_context_x27));
+        fprintf(fp, " task_struct_thread_context_x28: %ld\n",
+                OFFSET(task_struct_thread_context_x28));
+        fprintf(fp, " task_struct_thread_context_fp: %ld\n",
+                OFFSET(task_struct_thread_context_fp));
+        fprintf(fp, " task_struct_thread_context_sp: %ld\n",
+                OFFSET(task_struct_thread_context_sp));
+        fprintf(fp, " task_struct_thread_context_pc: %ld\n",
+                OFFSET(task_struct_thread_context_pc));
  fprintf(fp, "         task_struct_processor: %ld\n",
  OFFSET(task_struct_processor));
  fprintf(fp, "            task_struct_p_pptr: %ld\n",
--
2.34.1

Thanks
Guanyou
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
From 8074ff2fc3341a73e1694efe9d16bc1cefce0848 Mon Sep 17 00:00:00 2001
From: "Guanyou.Chen" <chenguanyou@xxxxxxxxxx>
Date: Wed, 6 Nov 2024 10:07:16 +0800
Subject: [PATCH] arm64: gdb stack unwind append more registers

Let gdb fetch_registers include cpu context x19~x28,
This may not mean for already scheduled tasks, but
gdb stack unwind show more args.

Before:
    crash> gdb bt
    #0  __switch_to (prev=<unavailable>, prev@entry=0xffffff80025f0000, next=next@entry=<unavailable>) at arch/arm64/kernel/process.c:566
    #1  0xffffffc008f820b8 in context_switch (rq=0xffffff81fcf419c0, prev=0xffffff80025f0000, next=<unavailable>, rf=<optimized out>) at kernel/sched/core.c:5471
    #2  __schedule (sched_mode=<optimized out>, sched_mode@entry=168999904) at kernel/sched/core.c:6857
    #3  0xffffffc008f82514 in schedule () at kernel/sched/core.c:6933
    ...

After:
    crash> gdb bt
    #0  __switch_to (prev=prev@entry=0xffffff80025f0000, next=next@entry=0xffffff80026092c0) at arch/arm64/kernel/process.c:566
    #1  0xffffffc008f820b8 in context_switch (rq=0xffffff81fcf419c0, prev=0xffffff80025f0000, next=0xffffff80026092c0, rf=<optimized out>) at kernel/sched/core.c:5471
    #2  __schedule (sched_mode=<optimized out>, sched_mode@entry=168999904) at kernel/sched/core.c:6857
    #3  0xffffffc008f82514 in schedule () at kernel/sched/core.c:6933
    ...

Signed-off-by: Guanyou.Chen <chenguanyou@xxxxxxxxxx>
---
 arm64.c   | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 defs.h    | 20 +++++++++++++++++
 symbols.c | 32 ++++++++++++++++++++++-----
 3 files changed, 110 insertions(+), 8 deletions(-)

diff --git a/arm64.c b/arm64.c
index 608b19d..e3c77d4 100644
--- a/arm64.c
+++ b/arm64.c
@@ -2726,6 +2726,9 @@ arm64_stackframe_init(void)
 	long thread_struct_cpu_context;
 	long context_sp, context_pc, context_fp;
 	struct syment *sp1, *sp1n, *sp2, *sp2n, *sp3, *sp3n;
+	long context_x19, context_x20, context_x21, context_x22;
+	long context_x23, context_x24, context_x25, context_x26;
+	long context_x27, context_x28;
 
 	STRUCT_SIZE_INIT(note_buf, "note_buf_t");
 	STRUCT_SIZE_INIT(elf_prstatus, "elf_prstatus");
@@ -2809,6 +2812,16 @@ arm64_stackframe_init(void)
 	context_sp = MEMBER_OFFSET("cpu_context", "sp");
 	context_fp = MEMBER_OFFSET("cpu_context", "fp");
 	context_pc = MEMBER_OFFSET("cpu_context", "pc");
+	context_x19 = MEMBER_OFFSET("cpu_context", "x19");
+	context_x20 = MEMBER_OFFSET("cpu_context", "x20");
+	context_x21 = MEMBER_OFFSET("cpu_context", "x21");
+	context_x22 = MEMBER_OFFSET("cpu_context", "x22");
+	context_x23 = MEMBER_OFFSET("cpu_context", "x23");
+	context_x24 = MEMBER_OFFSET("cpu_context", "x24");
+	context_x25 = MEMBER_OFFSET("cpu_context", "x25");
+	context_x26 = MEMBER_OFFSET("cpu_context", "x26");
+	context_x27 = MEMBER_OFFSET("cpu_context", "x27");
+	context_x28 = MEMBER_OFFSET("cpu_context", "x28");
 	if (context_sp == INVALID_OFFSET) {
 		error(INFO, "cannot determine cpu_context.sp offset\n");
 		return;
@@ -2827,6 +2840,26 @@ arm64_stackframe_init(void)
 		task_struct_thread + thread_struct_cpu_context + context_fp;
 	ASSIGN_OFFSET(task_struct_thread_context_pc) =
 		task_struct_thread + thread_struct_cpu_context + context_pc;
+	ASSIGN_OFFSET(task_struct_thread_context_x19) =
+		task_struct_thread + thread_struct_cpu_context + context_x19;
+	ASSIGN_OFFSET(task_struct_thread_context_x20) =
+		task_struct_thread + thread_struct_cpu_context + context_x20;
+	ASSIGN_OFFSET(task_struct_thread_context_x21) =
+		task_struct_thread + thread_struct_cpu_context + context_x21;
+	ASSIGN_OFFSET(task_struct_thread_context_x22) =
+		task_struct_thread + thread_struct_cpu_context + context_x22;
+	ASSIGN_OFFSET(task_struct_thread_context_x23) =
+		task_struct_thread + thread_struct_cpu_context + context_x23;
+	ASSIGN_OFFSET(task_struct_thread_context_x24) =
+		task_struct_thread + thread_struct_cpu_context + context_x24;
+	ASSIGN_OFFSET(task_struct_thread_context_x25) =
+		task_struct_thread + thread_struct_cpu_context + context_x25;
+	ASSIGN_OFFSET(task_struct_thread_context_x26) =
+		task_struct_thread + thread_struct_cpu_context + context_x26;
+	ASSIGN_OFFSET(task_struct_thread_context_x27) =
+		task_struct_thread + thread_struct_cpu_context + context_x27;
+	ASSIGN_OFFSET(task_struct_thread_context_x28) =
+		task_struct_thread + thread_struct_cpu_context + context_x28;
 }
 
 #define KERNEL_MODE (1)
@@ -4251,6 +4284,16 @@ arm64_get_stackframe(struct bt_info *bt, struct arm64_stackframe *frame)
 	frame->sp = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_sp));
 	frame->pc = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_pc));
 	frame->fp = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_fp));
+	frame->x19 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x19));
+	frame->x20 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x20));
+	frame->x21 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x21));
+	frame->x22 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x22));
+	frame->x23 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x23));
+	frame->x24 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x24));
+	frame->x25 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x25));
+	frame->x26 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x26));
+	frame->x27 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x27));
+	frame->x28 = ULONG(tt->task_struct + OFFSET(task_struct_thread_context_x28));
 
 	return TRUE;
 }
@@ -4275,10 +4318,29 @@ arm64_get_stack_frame(struct bt_info *bt, ulong *pcp, ulong *spp)
 		ur_bitmap->ur.pc = stackframe.pc;
 		ur_bitmap->ur.sp = stackframe.sp;
 		ur_bitmap->ur.regs[29] = stackframe.fp;
+		ur_bitmap->ur.regs[28] = stackframe.x28;
+		ur_bitmap->ur.regs[27] = stackframe.x27;
+		ur_bitmap->ur.regs[26] = stackframe.x26;
+		ur_bitmap->ur.regs[25] = stackframe.x25;
+		ur_bitmap->ur.regs[24] = stackframe.x24;
+		ur_bitmap->ur.regs[23] = stackframe.x23;
+		ur_bitmap->ur.regs[22] = stackframe.x22;
+		ur_bitmap->ur.regs[21] = stackframe.x21;
+		ur_bitmap->ur.regs[20] = stackframe.x20;
+		ur_bitmap->ur.regs[19] = stackframe.x19;
 		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, pc));
 		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, sp));
-		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0])
-						+ X29_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X29_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X28_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X27_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X26_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X25_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X24_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X23_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X22_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X21_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X20_REGNUM - X0_REGNUM);
+		SET_BIT(ur_bitmap->bitmap, REG_SEQ(arm64_pt_regs, regs[0]) + X19_REGNUM - X0_REGNUM);
 		bt->machdep = ur_bitmap;
 		bt->need_free = TRUE;
 	}
diff --git a/defs.h b/defs.h
index b93a7a6..219f521 100644
--- a/defs.h
+++ b/defs.h
@@ -2001,6 +2001,16 @@ struct offset_table {                    /* stash of commonly-used offsets */
 	long tnt_bit;
 	long tnt_true;
 	long tnt_false;
+	long task_struct_thread_context_x19;
+	long task_struct_thread_context_x20;
+	long task_struct_thread_context_x21;
+	long task_struct_thread_context_x22;
+	long task_struct_thread_context_x23;
+	long task_struct_thread_context_x24;
+	long task_struct_thread_context_x25;
+	long task_struct_thread_context_x26;
+	long task_struct_thread_context_x27;
+	long task_struct_thread_context_x28;
 	long task_struct_thread_context_fp;
 	long task_struct_thread_context_sp;
 	long task_struct_thread_context_pc;
@@ -3584,6 +3594,16 @@ struct machine_specific {
 };
 
 struct arm64_stackframe {
+        unsigned long x19;
+        unsigned long x20;
+        unsigned long x21;
+        unsigned long x22;
+        unsigned long x23;
+        unsigned long x24;
+        unsigned long x25;
+        unsigned long x26;
+        unsigned long x27;
+        unsigned long x28;
         unsigned long fp;
         unsigned long sp;
         unsigned long pc;
diff --git a/symbols.c b/symbols.c
index a26bdc1..0ac18dd 100644
--- a/symbols.c
+++ b/symbols.c
@@ -9829,12 +9829,32 @@ dump_offset_table(char *spec, ulong makestruct)
                 OFFSET(task_struct_thread_reg29));
         fprintf(fp, "      task_struct_thread_reg31: %ld\n",
                 OFFSET(task_struct_thread_reg31));
-	fprintf(fp, " task_struct_thread_context_fp: %ld\n",
-		OFFSET(task_struct_thread_context_fp));
-	fprintf(fp, " task_struct_thread_context_sp: %ld\n",
-		OFFSET(task_struct_thread_context_sp));
-	fprintf(fp, " task_struct_thread_context_pc: %ld\n",
-		OFFSET(task_struct_thread_context_pc));
+        fprintf(fp, " task_struct_thread_context_x19: %ld\n",
+                OFFSET(task_struct_thread_context_x19));
+        fprintf(fp, " task_struct_thread_context_x20: %ld\n",
+                OFFSET(task_struct_thread_context_x20));
+        fprintf(fp, " task_struct_thread_context_x21: %ld\n",
+                OFFSET(task_struct_thread_context_x21));
+        fprintf(fp, " task_struct_thread_context_x22: %ld\n",
+                OFFSET(task_struct_thread_context_x22));
+        fprintf(fp, " task_struct_thread_context_x23: %ld\n",
+                OFFSET(task_struct_thread_context_x23));
+        fprintf(fp, " task_struct_thread_context_x24: %ld\n",
+                OFFSET(task_struct_thread_context_x24));
+        fprintf(fp, " task_struct_thread_context_x25: %ld\n",
+                OFFSET(task_struct_thread_context_x25));
+        fprintf(fp, " task_struct_thread_context_x26: %ld\n",
+                OFFSET(task_struct_thread_context_x26));
+        fprintf(fp, " task_struct_thread_context_x27: %ld\n",
+                OFFSET(task_struct_thread_context_x27));
+        fprintf(fp, " task_struct_thread_context_x28: %ld\n",
+                OFFSET(task_struct_thread_context_x28));
+        fprintf(fp, " task_struct_thread_context_fp: %ld\n",
+                OFFSET(task_struct_thread_context_fp));
+        fprintf(fp, " task_struct_thread_context_sp: %ld\n",
+                OFFSET(task_struct_thread_context_sp));
+        fprintf(fp, " task_struct_thread_context_pc: %ld\n",
+                OFFSET(task_struct_thread_context_pc));
 	fprintf(fp, "         task_struct_processor: %ld\n", 
 		OFFSET(task_struct_processor));
 	fprintf(fp, "            task_struct_p_pptr: %ld\n",
-- 
2.34.1

--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

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

 

Powered by Linux