1 # Test that GDB properly ignores invalid stabs.
2 # Also test that GDB can debug a .o file, and that it doesn't mind
3 # a file that's more minimal than what a compiler normally puts out.
10 gdb_reinitialize_dir $srcdir/$subdir
12 # Don't use gdb_load; it doesn't bitch if the loading produced some
13 # error messages during symbol reading.
14 set binfile $objdir/$subdir/wierd.o
16 if ![file exists $binfile] then {
17 error "$binfile does not exist."
21 send "file $binfile\n"
23 -re "^file $binfile\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$prompt $" {
24 pass "wierd.o read without error"
27 fail "Errors reading wierd.o"
30 error "couldn't load $binfile into $GDB (timed out)."
35 proc print_wierd_var { var } {
38 # Currently one of these symbols gives an error() in symbol
39 # reading, which causes any attempt to read (full, not
40 # partial) symbols for the file to lose.
43 # Make sure that the variable gets printed out correctly, without
44 # any sort of warning message.
47 -re "^print $var\r*\n.\[0-9\]* = 42.*$prompt $" {
48 pass "variable $var printed properly"
52 fail "variable $var not printed properly"
55 timeout { fail "variable $var not printed (timeout)" }
64 print_wierd_var attr32
65 print_wierd_var attr33
66 print_wierd_var attr35
67 print_wierd_var attr36
68 print_wierd_var attr37
69 print_wierd_var attr38
70 print_wierd_var attr39
71 print_wierd_var attr41
72 print_wierd_var attr42
73 print_wierd_var attr43
74 print_wierd_var attr44
75 print_wierd_var attr46
76 print_wierd_var attr47
77 print_wierd_var attr58
78 print_wierd_var attr59
79 print_wierd_var attr60
80 print_wierd_var attr61
81 print_wierd_var attr62
82 print_wierd_var attr63
83 print_wierd_var attr64
84 print_wierd_var attr65
85 print_wierd_var attr66
86 print_wierd_var attr67
87 print_wierd_var attr68
88 print_wierd_var attr69
89 print_wierd_var attr70
90 print_wierd_var attr71
91 print_wierd_var attr72
92 print_wierd_var attr73
93 print_wierd_var attr74
94 print_wierd_var attr75
95 print_wierd_var attr76
96 print_wierd_var attr77
97 print_wierd_var attr78
98 print_wierd_var attr79
99 print_wierd_var attr80
100 print_wierd_var attr81
101 print_wierd_var attr82
102 print_wierd_var attr83
103 print_wierd_var attr84
104 print_wierd_var attr85
105 print_wierd_var attr86
106 print_wierd_var attr87
107 print_wierd_var attr88
108 print_wierd_var attr89
109 print_wierd_var attr90
110 print_wierd_var attr91
111 print_wierd_var attr92
112 print_wierd_var attr93
113 print_wierd_var attr94
114 print_wierd_var attr95
115 print_wierd_var attr96
116 print_wierd_var attr97
117 print_wierd_var attr98
118 print_wierd_var attr99
119 print_wierd_var attr100
120 print_wierd_var attr101
121 print_wierd_var attr102
122 print_wierd_var attr103
123 print_wierd_var attr104
124 print_wierd_var attr105
125 print_wierd_var attr106
126 print_wierd_var attr107
127 print_wierd_var attr108
128 print_wierd_var attr109
129 print_wierd_var attr110
130 print_wierd_var attr111
131 print_wierd_var attr112
132 print_wierd_var attr113
133 print_wierd_var attr114
134 print_wierd_var attr115
135 print_wierd_var attr116
136 print_wierd_var attr117
137 print_wierd_var attr118
138 print_wierd_var attr119
139 print_wierd_var attr120
140 print_wierd_var attr121
141 print_wierd_var attr122
142 print_wierd_var attr123
143 print_wierd_var attr124
144 print_wierd_var attr125
145 print_wierd_var attr126
147 #Prevent some failures in default.exp, which are probably GDB bugs
148 # (but trivial ones).