diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/break-interp.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/break-interp.exp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index ce86cab..553bbc6 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -237,6 +237,27 @@ proc reach {func command} { } } +proc test_core {file} { + global srcdir subdir gdb_prompt + + set corefile [core_find $file] + if {$corefile == ""} { + return + } + + gdb_exit + gdb_start + # Clear it to never find any separate debug infos in $debug_root. + gdb_test "set debug-file-directory" "" "set debug-file-directory for core" + gdb_reinitialize_dir $srcdir/$subdir + gdb_load $file + + # Do not check the binary filename as it may be truncated. + gdb_test "core-file $corefile" "Core was generated by .*\r\n#0 .*" "core loaded" + + gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "core main bt" +} + proc test_ld {file ifmain trynosym} { global srcdir subdir gdb_prompt @@ -259,6 +280,8 @@ proc test_ld {file ifmain trynosym} { reach "libfunc" continue gdb_test "bt" "#0 +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#1 +\[^\r\n\]*\\mmain\\M.*" "main bt" + + test_core $file } if !$trynosym { |