aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
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
parent06a6f27066c695efbde2773efafd2be68f7a7d1c (diff)
downloadgdb-61f0d76280d963a9ecf3a3a525dae7ac21050636.zip
gdb-61f0d76280d963a9ecf3a3a525dae7ac21050636.tar.gz
gdb-61f0d76280d963a9ecf3a3a525dae7ac21050636.tar.bz2
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')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp23
2 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3756109..9a571ad 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.base/break-interp.exp (test_core): New proc.
+ (test_ld): Call it.
+
+2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* gdb.base/break-interp-main.c, gdb.base/break-interp-lib.c: New.
* gdb.base/break-interp.exp: Exit on skip_shlib_tests. Change $srcfile.
New variables $binfile_lib and $srcfile_lib. Call get_compiler_info
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 {