[Crash-utility] [PATCH 5/5] ppc64: Enable live debug support for gdb stack unwinding

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

 



The live debug can be enabled for ppc64. For inactive tasks, it can show
the stack unwinding results:

crash> sys
      KERNEL: /usr/lib/debug/lib/modules/5.14.0-425.el9.ppc64le/vmlinux
    DUMPFILE: /proc/kcore
          ...
crash> set 1
crash> bt
PID: 1        TASK: c0000000035fc900  CPU: 1    COMMAND: "systemd"
 #0 [c00000000369fa60] __schedule at c000000000fc3c58
 #1 [c00000000369fb20] schedule at c000000000fc411c
 #2 [c00000000369fb50] schedule_hrtimeout_range_clock at c000000000fcd2a4
 #3 [c00000000369fc00] ep_poll at c00000000063640c
 #4 [c00000000369fcf0] do_epoll_wait at c000000000636584
 #5 [c00000000369fd40] sys_epoll_wait at c000000000636608
 #6 [c00000000369fdb0] system_call_exception at c00000000002e994
 #7 [c00000000369fe10] system_call_vectored_common at c00000000000bfe8
crash> gdb bt
 #0  0xc000000000fc3c58 in context_switch ...
 #1  __schedule ...
 #2  0xc000000000fc411c in schedule_loop ...
 #3  schedule ...
 #4  0xc000000000fcd2a4 in schedule_hrtimeout_range_clock ...
 #5  0xc00000000063640c in ep_poll ...
 #6  0xc000000000636584 in do_epoll_wait ...
 #7  0xc000000000636608 in __do_sys_epoll_wait ...
 #8  __se_sys_epoll_wait ...
 #9  0xc00000000002e994 in system_call_exception ...
 #10 0xc00000000000bfe8 in system_call_vectored_common ...

However for active tasks in live mode, stack unwind will fail. The behaviour
is similar for "bt" and "gdb bt":

crash> ps
      PID    PPID  CPU       TASK        ST  %MEM      VSZ      RSS  COMM
        0       0   0  c000000002af6380  RU   0.0        0        0  [swapper/0]
>       0       0   1  c0000000035f9000  RU   0.0        0        0  [swapper/1]
>       0       0   2  c0000000035f0180  RU   0.0        0        0  [swapper/2]
...
crash> set c0000000035f0180
crash> bt
PID: 0        TASK: c0000000035f0180  CPU: 2    COMMAND: "swapper/2"
(active)
crash> gdb bt
 #0  0xc000000003847d50 in ?? ()
 #1  0x0000000000000000 in ?? ()

Signed-off-by: Tao Liu <ltao@xxxxxxxxxx>
---
 ppc64.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/ppc64.c b/ppc64.c
index f86d951..a87e621 100644
--- a/ppc64.c
+++ b/ppc64.c
@@ -2516,11 +2516,6 @@ ppc64_get_cpu_reg(int cpu, int regno, const char *name, int size,
 	ulong ip, sp;
 	bool ret = FALSE;
 
-	if (LIVE()) {
-		/* doesn't support reading registers in live dump */
-		return FALSE;
-	}
-
 	/* Currently only handling registers available in ppc64_pt_regs:
 	 *
 	 * 0-31:   r0-r31
-- 
2.40.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