crash can't switch frame and look up the local variable of stack
by qendo
hi all
while i using crash to analysis kdump, i find some missing feature of crash
crash can't switch frame and look up the local variable of stack like gdb
p local_var_a
p local_var_b
info local
f 1
f 2
f 3
is there any plan support those operation?
thanks
7 years, 2 months
[PATCH] extensions, ptdump: Add error message when the crash analyses a live system.
by Inoguchi, Yuki
Hi, Indoh-san,
ptdump does not support retrieving the trace data from the live system.
However, the current error message does not tell so.
When the crash analyses a live system, ptdump only displays the following message:
crash> ptdump foo
ptdump: invalid size request: 0 type: "read page for write"
I think it's better to have a different message to let users know why error occurs.
Therefore, I added the following error message in ptdump:
crash> ptdump foo
ptdump: no support on live system
Please merge this patch.
---
ptdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ptdump.c b/ptdump.c
index 8d5c367..44b19fb 100644
--- a/ptdump.c
+++ b/ptdump.c
@@ -491,6 +491,9 @@ cmd_ptdump(void)
if (argcnt != 2)
cmd_usage(pc->curcmd, SYNOPSIS);
+ if (ACTIVE())
+ error(FATAL, "no support on live system\n");
+
outdir = args[1];
if ((ret = mkdir(outdir, mode))) {
fprintf(fp, "Cannot create directory %s: %d\n", outdir, ret);
--
1.8.3.1
Regards,
--
Yuki Inoguchi
7 years, 2 months