Patch to add comments
by Imap
Hello Dave,
A small cosmetic pach to add comments in the crash flow.
Of course we may use !# to do this, but to call a shell just for a comment seems rather hard ?
With !#, we have:
crash> !#
crash> !# sysrq-triger
crash> !#
crash> file_operations 0xffffffff81643300
struct file_operations {
owner = 0x0,
llseek = 0xffffffff81166b90 <noop_llseek>,
read = 0,
write = 0xffffffff812fa4b0 <write_sysrq_trigger>,
[...]
}After the introduction of the command #, we just have:
crash> #
crash> # sysrq-triger
crash> #
crash> file_operations 0xffffffff81643300
struct file_operations {
owner = 0x0,
llseek = 0xffffffff81166b90 <noop_llseek>,
read = 0,
write = 0xffffffff812fa4b0 <write_sysrq_trigger>,
[...]
}
12 years, 4 months
bt -g not working since 5.1.9?
by Petr Tesarik
Hi,
I noticed that the "-g" option to "bt" seems to have no effect in recent crash
versions. And indeed, 5.1.8-to-5.1.9.patch contains the following chunk:
--- crash-5.1.8/kernel.c 2011-10-17 14:06:31.000000000 -0400
+++ crash-5.1.9/kernel.c 2011-09-28 15:31:00.000000000 -0400
@@ -1876,10 +1896,10 @@ cmd_bt(void)
break;
case 'g':
-#if defined(GDB_6_0) || defined(GDB_6_1) || defined(GDB_7_0)
- bt->flags |= BT_THREAD_GROUP;
-#else
+#ifdef GDB_5_3
bt->flags |= BT_USE_GDB;
+else
+ bt->flags |= BT_THREAD_GROUP;
#endif
break;
Note that the hash sign is missing, so the pre-processor only leaves the
"break" statement... The following patch seems to help.
Signed-off-by: Petr Tesarik <ptesarik(a)suse.cz>
--- a/kernel.c
+++ b/kernel.c
@@ -1922,7 +1922,7 @@ cmd_bt(void)
case 'g':
#ifdef GDB_5_3
bt->flags |= BT_USE_GDB;
-else
+#else
bt->flags |= BT_THREAD_GROUP;
#endif
break;
12 years, 5 months
issues at MORE prompt in running "ps" command on crash from within another C program
by Nayna Jain
Hi,
I am trying to provide a console from within Eclipse IDE for crash.
This way they can execute commands on crash prompt from within Eclipse.
To make this work, first I tried to write a simple C program which invokes
crash from within the program on a tty.
It uses forkpty for this purpose and then execv the crash.
It works fine, crash prompt is reached.
few commands having small outputs works fine.
But commands like ps which works along with "more" to do paging of output
has issue.
When it stops at the line of MORE.. expecting input from user like SPACE,
q, b etc., it doesn't recognize it directly.
I have to type SPACE and then ENTER. q and then ENTER.
What termios setting is required to make it work ? Can someone please help
with this issue ? How do I make it recognize SPACE, q , at MORE prompt.?
--
Courage is not the absence of fear but rather the judgment that something
is more important than fear. The brave may not live forever but the
cautious do not live at all. -- The Princess Diaries
12 years, 5 months