mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
[gdb/testsuite] Fix FAIL in gdb.tui/corefile-run.exp
When running test-case gdb.tui/corefile-run.exp on openSUSE Tumbleweed, I run into: ... PASS: gdb.tui/corefile-run.exp: load corefile FAIL: gdb.tui/corefile-run.exp: run until the end ... What's going on is easier to see when also doing dump_screen if check_contents passes, and inspecting state at the preceding PASS: ... +-------------------------------------------------------------------------+ exec No process In: L?? PC: ?? [New LWP 16629] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/data/gdb_versions/devel/build/gdb/testsuite/output s/gdb.tui/corefile-run/corefi'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 main () --Type <RET> for more, q to quit, c to continue without paging-- ... The problem is that we're getting a pagination prompt, and the subsequent run command is interpreted as an answer to that prompt. Fix this by: - detecting the gdb prompt in response to "load corefile", such that we detect the failure earlier, and - doing a "set pagination off" in Term::clean_restart. Tested on x86_64-linux.
This commit is contained in:
@ -54,7 +54,7 @@ gdb_assert {![string match "No Source Available" $text]} \
|
|||||||
"initial source listing"
|
"initial source listing"
|
||||||
|
|
||||||
Term::command "core-file $core"
|
Term::command "core-file $core"
|
||||||
Term::check_contents "load corefile" "21 *return 0"
|
Term::check_contents "load corefile" "21 *return 0.*$gdb_prompt .*"
|
||||||
|
|
||||||
Term::command "run"
|
Term::command "run"
|
||||||
Term::check_contents "run until the end" \
|
Term::check_contents "run until the end" \
|
||||||
|
@ -595,6 +595,7 @@ namespace eval Term {
|
|||||||
} else {
|
} else {
|
||||||
::clean_restart $executable
|
::clean_restart $executable
|
||||||
}
|
}
|
||||||
|
::gdb_test_no_output "set pagination off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user