| OLD | NEW |
| 1 # Copyright 2008-2012 Free Software Foundation, Inc. | 1 # Copyright 2008-2012 Free Software Foundation, Inc. |
| 2 | 2 |
| 3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
| 4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
| 5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
| 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 |
| 16 load_lib dwarf.exp | 16 load_lib dwarf.exp |
| 17 # This test can only be run on targets which support DWARF-2 and use gas. | 17 # This test can only be run on targets which support DWARF-2 and use gas. |
| 18 load_lib mi-support.exp | 18 load_lib mi-support.exp |
| 19 set MIFLAGS "-i=mi" | 19 set MIFLAGS "-i=mi" |
| 20 | 20 |
| 21 if {![dwarf2_support]} { | 21 if {![dwarf2_support]} { |
| 22 return 0 | 22 return 0 |
| 23 } | 23 } |
| 24 | 24 |
| 25 set testfile "dw2-ref-missing-frame" | 25 standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c |
| 26 set srcsfile ${testfile}.S | 26 set objsfile [standard_output_file ${testfile}.o] |
| 27 set objsfile ${objdir}/${subdir}/${testfile}.o | 27 set objfuncfile [standard_output_file ${testfile}-func.o] |
| 28 set srcfuncfile ${testfile}-func.c | 28 set objmainfile [standard_output_file ${testfile}-main.o] |
| 29 set objfuncfile ${objdir}/${subdir}/${testfile}-func.o | |
| 30 set srcmainfile ${testfile}-main.c | |
| 31 set objmainfile ${objdir}/${subdir}/${testfile}-main.o | |
| 32 set executable ${testfile} | |
| 33 set binfile ${objdir}/${subdir}/${executable} | |
| 34 | 29 |
| 35 if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != "" | 30 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != "" |
| 36 || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}
] != "" | 31 || [gdb_compile "${srcdir}/${subdir}/${srcfile2}" $objfuncfile object {}] !
= "" |
| 37 || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {d
ebug}] != "" | 32 || [gdb_compile "${srcdir}/${subdir}/${srcfile3}" $objmainfile object {debu
g}] != "" |
| 38 || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {
}] != "" } { | 33 || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {
}] != "" } { |
| 39 return -1 | 34 return -1 |
| 40 } | 35 } |
| 41 | 36 |
| 42 if [mi_gdb_start] { | 37 if [mi_gdb_start] { |
| 43 continue | 38 continue |
| 44 } | 39 } |
| 45 | 40 |
| 46 mi_delete_breakpoints | 41 mi_delete_breakpoints |
| 47 mi_gdb_reinitialize_dir $srcdir/$subdir | 42 mi_gdb_reinitialize_dir $srcdir/$subdir |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 mi_gdb_reinitialize_dir $srcdir/$subdir | 58 mi_gdb_reinitialize_dir $srcdir/$subdir |
| 64 mi_gdb_load ${binfile} | 59 mi_gdb_load ${binfile} |
| 65 | 60 |
| 66 # And now try referencing DW_AT_frame_base defined using a self-reference | 61 # And now try referencing DW_AT_frame_base defined using a self-reference |
| 67 # (DW_OP_fbreg). | 62 # (DW_OP_fbreg). |
| 68 if [mi_runto func_loopfb_marker] { | 63 if [mi_runto func_loopfb_marker] { |
| 69 mi_gdb_test "301-stack-list-locals --thread 1 --frame 1 --all-values" \ | 64 mi_gdb_test "301-stack-list-locals --thread 1 --frame 1 --all-values" \ |
| 70 "301\\^done,locals=\\\[\{name=\"func_loopfb_var\",value=\"\\\<error read
ing variable: DWARF-2 expression error: Loop detected.*\"\},\{name=\"func_loopfb
_var2\",value=\"\\\<error reading variable: DWARF-2 expression error: Loop detec
ted.*\"\}\\\]" \ | 65 "301\\^done,locals=\\\[\{name=\"func_loopfb_var\",value=\"\\\<error read
ing variable: DWARF-2 expression error: Loop detected.*\"\},\{name=\"func_loopfb
_var2\",value=\"\\\<error reading variable: DWARF-2 expression error: Loop detec
ted.*\"\}\\\]" \ |
| 71 "test func_loopfb_var" | 66 "test func_loopfb_var" |
| 72 } | 67 } |
| OLD | NEW |