summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break-interp.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:09:05 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:09:05 +0000
commit61f0d76280d963a9ecf3a3a525dae7ac21050636 (patch)
tree59dd35b2e11cb7b01e14b2ed74254c62d4b07a9b /gdb/testsuite/gdb.base/break-interp.exp
parent06a6f27066c695efbde2773efafd2be68f7a7d1c (diff)
gdb/
* solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable target_section. Find SECT in current_target_sections, gdb_assert it. (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile. New variable abfd. * symtab.c (lookup_objfile_from_block): Return the binary file instead of separate debug info file. gdb/testsuite/ * gdb.base/break-interp.exp (test_core): New proc. (test_ld): Call it.
Diffstat (limited to 'gdb/testsuite/gdb.base/break-interp.exp')
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp23
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 ce86cabc4e..553bbc6266 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 {