]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-6.3-test-sepcrc-20050402.patch
- obsolete file
[packages/gdb.git] / gdb-6.3-test-sepcrc-20050402.patch
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}"
8  }
9 +
10 +
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.
15 +
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}] != "" } {
22 +    return -1
23 +}
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"
27 +    return -1
28 +}
29 +remote_exec build "cp $corrupt_debug_file ${existing_binfile}.debug"
30 +
31 +gdb_exit
32 +gdb_start
33 +gdb_reinitialize_dir $srcdir/$subdir
34 +gdb_load ${binfile}
35 +
36 +set test  "A corrupt debug file gets a warning"
37 +gdb_test_multiple "file $existing_binfile" "$test" {
38 +    -re "warning:.*mismatch.*" {
39 +       pass "$test"
40 +    }
41 +    -re ".y or n. " {
42 +       send_gdb "y\n"
43 +       exp_continue
44 +    }
45 +}
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
50 @@ -0,0 +1,5 @@
51 +int
52 +main (int argc, char *argv[], char *envp[])
53 +{
54 +  return 0;
55 +}
This page took 0.070315 seconds and 3 git commands to generate.