OLD | NEW |
1 # Copyright 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2011-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 |
(...skipping 18 matching lines...) Expand all Loading... |
29 # main.c 9 func3 | 29 # main.c 9 func3 |
30 # func3 = Breakpoint location 2 | 30 # func3 = Breakpoint location 2 |
31 # `otherinline' called at main.c line 9 | 31 # `otherinline' called at main.c line 9 |
32 # end of main func_end | 32 # end of main func_end |
33 | 33 |
34 # This test can only be run on targets which support DWARF-2 and use gas. | 34 # This test can only be run on targets which support DWARF-2 and use gas. |
35 if {![dwarf2_support]} { | 35 if {![dwarf2_support]} { |
36 return 0 | 36 return 0 |
37 } | 37 } |
38 | 38 |
39 set testfile "dw2-skip-prologue" | 39 standard_testfile |
40 set executable ${testfile} | 40 set executable ${testfile} |
41 set binfile ${objdir}/${subdir}/${executable} | |
42 | 41 |
43 if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S
" {additional_flags=-DINLINED}] == -1} { | 42 if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S
" {additional_flags=-DINLINED}] == -1} { |
44 return -1 | 43 return -1 |
45 } | 44 } |
46 | 45 |
47 # We need those symbols global to access them from the .S file. | 46 # We need those symbols global to access them from the .S file. |
48 set test "strip stub symbols" | 47 set test "strip stub symbols" |
49 set objcopy_program [transform objcopy] | 48 set objcopy_program [transform objcopy] |
50 set result [catch "exec $objcopy_program
\ | 49 set result [catch "exec $objcopy_program
\ |
51 -N func0 -N func1 -N func2 -N func3 -N func_star
t -N func_end \ | 50 -N func0 -N func1 -N func2 -N func3 -N func_star
t -N func_end \ |
(...skipping 13 matching lines...) Expand all Loading... |
65 return -1 | 64 return -1 |
66 } | 65 } |
67 | 66 |
68 gdb_breakpoint "func" | 67 gdb_breakpoint "func" |
69 gdb_continue_to_breakpoint "func" | 68 gdb_continue_to_breakpoint "func" |
70 | 69 |
71 # Sanity check GDB has really found 2 locations | 70 # Sanity check GDB has really found 2 locations |
72 gdb_test {info break $bpnum} "\r\n2\\.1\[ \t\]\[^\n\]*\r\n2\\.2\[ \t\]\[^\n\]*"
"2 locations found" | 71 gdb_test {info break $bpnum} "\r\n2\\.1\[ \t\]\[^\n\]*\r\n2\\.2\[ \t\]\[^\n\]*"
"2 locations found" |
73 | 72 |
74 gdb_test "p v" " = 0" "no statement got executed" | 73 gdb_test "p v" " = 0" "no statement got executed" |
OLD | NEW |