summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp
blob: 60f3605caa4576c5eece2a04e9f352e2ed290ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# OBSOLETE # usrthbasic.exp -- Expect script to test gdb with user threads
# OBSOLETE # Copyright (C) 1992 Free Software Foundation, Inc.
# OBSOLETE 
# OBSOLETE # This program is free software; you can redistribute it and/or modify
# OBSOLETE # it under the terms of the GNU General Public License as published by
# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
# OBSOLETE # (at your option) any later version.
# OBSOLETE # 
# OBSOLETE # This program is distributed in the hope that it will be useful,
# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# OBSOLETE # GNU General Public License for more details.
# OBSOLETE # 
# OBSOLETE # You should have received a copy of the GNU General Public License
# OBSOLETE # along with this program; if not, write to the Free Software
# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
# OBSOLETE 
# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
# OBSOLETE # bug-gdb@prep.ai.mit.edu
# OBSOLETE 
# OBSOLETE # use this to debug:
# OBSOLETE #
# OBSOLETE #log_user 1
# OBSOLETE 
verbose "HP's thread tests are broken beyond repair right now." 
return 0
# OBSOLETE 
# OBSOLETE if $tracelevel {
# OBSOLETE     strace $tracelevel
# OBSOLETE }
# OBSOLETE 
# OBSOLETE if { [skip_hp_tests] } { continue }
# OBSOLETE 
# OBSOLETE if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } {
# OBSOLETE     verbose "HPUX thread test ignored for non-hppa or PA64 targets."
# OBSOLETE     return 0
# OBSOLETE }
# OBSOLETE 
# OBSOLETE set testfile usrthbasic
# OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.c
# OBSOLETE set binfile ${srcdir}/${subdir}/${testfile}
# OBSOLETE 
# OBSOLETE # To build the executable we need to link against the thread library.
# OBSOLETE #
# OBSOLETE #	/opt/ansic/bin/cc -Ae +DAportable -g -o usrthbasic -lcma usrthbasic.c
# OBSOLETE #
# OBSOLETE ## we have trouble building it on 11.0, so we use the prebuilt
# OBSOLETE ## executable instead.
# OBSOLETE ##
# OBSOLETE ##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
# OBSOLETE ##    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
# OBSOLETE ##}
# OBSOLETE 
# OBSOLETE # We don't really seem to need longer waits.
# OBSOLETE #
# OBSOLETE ##set oldtimeout $timeout
# OBSOLETE ##set timeout [expr "$timeout + 0"]
# OBSOLETE ##set oldverbose $verbose
# OBSOLETE ##set verbose 40
# OBSOLETE 
# OBSOLETE #=========================
# OBSOLETE #
# OBSOLETE # Test looking at threads.
# OBSOLETE #
# OBSOLETE gdb_exit
# OBSOLETE gdb_start
# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
# OBSOLETE gdb_load ${binfile}
# OBSOLETE 
# OBSOLETE gdb_test "b main" ".*Breakpoint 1.*" "b main"
# OBSOLETE gdb_test "run" "Breakpoint 1, main.*:119.*" "run to main"
# OBSOLETE gdb_test "b thread1" ".*Breakpoint 2.*" "b thread1"
# OBSOLETE gdb_test "info threads" "\\* 1 system thread.*:119\[^(\]*" \
# OBSOLETE 	 "info threads at main"
# OBSOLETE gdb_test "c" "Breakpoint 2, thread1.*" "continue to thread1"
# OBSOLETE gdb_test "info threads" \
# OBSOLETE     "\\* 3 system thread.*thread1.*libcma.1.*libcma.1\[^(\]*" \
# OBSOLETE     "info threads at main"
# OBSOLETE gdb_test "b 165" "Breakpoint 3.*165.*" "break at main counter"
# OBSOLETE gdb_test "c" "Breakpoint 3, main.*" "continue to main counter"
# OBSOLETE gdb_test "info threads" "  4 system thread.*\\* 1 system thread.*main.*" \
# OBSOLETE     "info threads at main counter"
# OBSOLETE gdb_test "b 97" "Breakpoint 4.*97.*" "break at thread2 counter"
# OBSOLETE gdb_test "b 81" "Breakpoint 5.*81.*" "break at thread1 counter"
# OBSOLETE gdb_test "bt" "#0  main.* at \[^(\]*" "backtrace at main counter"
# OBSOLETE 
# OBSOLETE # After switching to thread 4, the cma scheduler should schedule it next
# OBSOLETE # and we should hit its breakpoint in thread2.
# OBSOLETE gdb_test "thread 4" ".Switching to thread 4.*cma__dispatch.*" \
# OBSOLETE 	 "switch to thread 4"
# OBSOLETE gdb_test "bt" "#0  .*thread2.*" "backtrace at thread 4"
# OBSOLETE sleep 1
# OBSOLETE gdb_test "c" ".*Breakpoint 4, thread2.*" "continue and get to thread 4"
# OBSOLETE 
# OBSOLETE # After switching to thread 1, the cma scheduler should schedule it next
# OBSOLETE # and we should hit its breakpoint (in main).
# OBSOLETE gdb_test "thread 1" ".*Switching to thread 1.*cma__dispatch.*" \
# OBSOLETE     "switch to thread 1"
# OBSOLETE sleep 1
# OBSOLETE gdb_test "c" ".*Breakpoint 3, main.*usrthbasic.c:165.*" \
# OBSOLETE     "continue and get to thread 1"
# OBSOLETE 
# OBSOLETE # Done!
# OBSOLETE #
# OBSOLETE gdb_exit
# OBSOLETE 
# OBSOLETE ##set timeout $oldtimeout
# OBSOLETE ##set verbose $oldverbose
# OBSOLETE 
# OBSOLETE return 0