eclair-dump-backtrace.exp: dump full backtrace of all mckernel threads

This commit is contained in:
Balazs Gerofi
2017-01-15 10:46:07 +09:00
parent f2f499aace
commit fa5c1b23ca
4 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,40 @@
#!/usr/bin/expect
set INST_DIR "@prefix@"
spawn $INST_DIR/bin/eclair -d /tmp/mckernel.dump -k $INST_DIR/smp-x86/kernel/mckernel.img -i
set state "init"
set thread_id 0
expect {
"(eclair) " {
switch -- $state {
"init" {
set state "threads"
send "info threads\r"
}
"threads" {
incr thread_id
set state "thread_bt"
send "thread $thread_id\r"
}
"thread_bt" {
set state "threads"
send "bt\r"
}
}
exp_continue
}
"Type <return> to continue, or q <return> to quit" {
send "\r"
exp_continue
}
" not known." {
expect "(eclair) " { send "quit\r" }
expect "Quit anyway? (y or n) " { send "y\r" }
exit 0
}
}