eclair-dump-backtrace.exp: handle user space threads

This commit is contained in:
Balazs Gerofi
2017-01-24 14:47:10 +09:00
parent ad214c8206
commit b812848a0e

View File

@@ -8,19 +8,36 @@ set state "init"
set thread_id 0
expect {
"in ?? ()" {
switch -- $state {
"thread_chosen" {
set state "thread_skip"
}
"thread_bt" {
set state "thread_skip"
}
}
exp_continue
}
"(eclair) " {
switch -- $state {
"init" {
set state "threads"
set state "threads_list"
send "info threads\r"
}
"threads" {
"threads_list" {
incr thread_id
set state "thread_bt"
set state "thread_chosen"
send "thread $thread_id\r"
}
"thread_bt" {
set state "threads"
"thread_skip" {
incr thread_id
set state "thread_chosen"
send "thread $thread_id\r"
}
"thread_chosen" {
set state "thread_bt"
send "bt\r"
}
}
@@ -28,7 +45,17 @@ expect {
exp_continue
}
"Type <return> to continue, or q <return> to quit" {
send "\r"
switch -- $state {
"threads_list" {
send "\r"
}
"thread_bt" {
send "\r"
}
"thread_skip" {
send "q\r"
}
}
exp_continue
}
" not known." {