OLD | NEW |
1 # Copyright (C) 2009-2012 Free Software Foundation, Inc. | 1 # Copyright (C) 2009-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 30 matching lines...) Expand all Loading... |
41 # single-step, and all other threads to continue, including thread | 41 # single-step, and all other threads to continue, including thread |
42 # 1. Before resuming any thread, gdbserver notices that it | 42 # 1. Before resuming any thread, gdbserver notices that it |
43 # remembers from step 4 a pending SIGTRAP to report for thread 1, | 43 # remembers from step 4 a pending SIGTRAP to report for thread 1, |
44 # so reports it now. | 44 # so reports it now. |
45 # | 45 # |
46 # 6) From GDB's perpective, this SIGTRAP can't represent a finished | 46 # 6) From GDB's perpective, this SIGTRAP can't represent a finished |
47 # single-step, since thread 1 was not single-stepping (it was | 47 # single-step, since thread 1 was not single-stepping (it was |
48 # continued in step 5). Neither does this SIGTRAP correspond to a | 48 # continued in step 5). Neither does this SIGTRAP correspond to a |
49 # breakpoint hit. GDB reports to the user a spurious SIGTRAP. | 49 # breakpoint hit. GDB reports to the user a spurious SIGTRAP. |
50 | 50 |
51 set testfile "pending-step" | 51 standard_testfile |
52 set srcfile ${testfile}.c | |
53 set binfile ${objdir}/${subdir}/${testfile} | |
54 | 52 |
55 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | 53 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
56 return -1 | 54 return -1 |
57 } | 55 } |
58 | 56 |
59 # Start with a fresh gdb. | 57 clean_restart ${binfile} |
60 | |
61 gdb_exit | |
62 gdb_start | |
63 gdb_reinitialize_dir $srcdir/$subdir | |
64 gdb_load ${binfile} | |
65 | 58 |
66 if ![runto_main] then { | 59 if ![runto_main] then { |
67 fail "Can't run to main" | 60 fail "Can't run to main" |
68 return 0 | 61 return 0 |
69 } | 62 } |
70 | 63 |
71 gdb_breakpoint [gdb_get_line_number "insert breakpoint here"] | 64 gdb_breakpoint [gdb_get_line_number "insert breakpoint here"] |
72 gdb_continue_to_breakpoint "continue to first breakpoint hit" | 65 gdb_continue_to_breakpoint "continue to first breakpoint hit" |
73 | 66 |
74 set test "next in multiple threads with breakpoints" | 67 set test "next in multiple threads with breakpoints" |
(...skipping 11 matching lines...) Expand all Loading... |
86 } | 79 } |
87 | 80 |
88 if { $ok == 0 } { | 81 if { $ok == 0 } { |
89 break | 82 break |
90 } | 83 } |
91 } | 84 } |
92 | 85 |
93 if { $ok } { | 86 if { $ok } { |
94 pass "$test" | 87 pass "$test" |
95 } | 88 } |
OLD | NEW |