1 Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp
2 ===================================================================
3 --- gdb-6.8.orig/gdb/testsuite/gdb.base/sepdebug.exp 2008-02-26 09:14:11.000000000 +0100
4 +++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp 2008-07-14 10:26:19.000000000 +0200
5 @@ -981,3 +981,40 @@ if ![string compare $build_id_debug_file
6 # Spare debug files may confuse testsuite runs in the future.
7 remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}"
11 +# Compile up a second, different, object file. Copy its debug info
12 +# over the top of the new debug info. Note that somewhere in the
13 +# above the "set debug-file-directory" variable is set to
14 +# ${objdir}/${subdir} so need to move things there.
16 +set existing_binfile $binfile
17 +set testfile "sepdebug2"
18 +set srcfile ${testfile}.c
19 +set binfile ${objdir}/${subdir}/${testfile}
20 +set corrupt_debug_file [separate_debug_filename $binfile]
21 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
24 +if [gdb_gnu_strip_debug $binfile] {
25 + # check that you have a recent version of strip and objcopy installed
26 + unsupported "cannot produce separate debug info files"
29 +remote_exec build "cp $corrupt_debug_file ${existing_binfile}.debug"
33 +gdb_reinitialize_dir $srcdir/$subdir
36 +set test "A corrupt debug file gets a warning"
37 +gdb_test_multiple "file $existing_binfile" "$test" {
38 + -re "warning:.*mismatch.*" {
46 Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c
47 ===================================================================
48 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
49 +++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c 2008-07-14 10:26:19.000000000 +0200
52 +main (int argc, char *argv[], char *envp[])