]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/hbreak2.exp
[gdbserver/lynx] spurious failure to write in inferior memory
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / hbreak2.exp
CommitLineData
ecd75fc8 1# Copyright 1988-2014 Free Software Foundation, Inc.
320b6f49
MR
2
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
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
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/>.
15
16# Based on break.exp by Rob Savoye. (rob@cygnus.com)
17# Hardware breakpoint support by Maciej W. Rozycki and Daniel Jacobowitz.
18# Only one hardware breakpoint is set at a time as targets may limit
19# the number available.
20
21
22if { [prepare_for_testing hbreak2.exp "hbreak2" {break.c break1.c} {debug nowarnings}] } {
23 return -1
24}
25set srcfile break.c
26set srcfile1 break1.c
27
28if ![runto_main] then { fail "break tests suppressed" }
29delete_breakpoints
30
31#
32# Test whether the target supports hardware breakpoints at all.
33#
34gdb_test_multiple "hbreak main" "hardware breakpoint support" {
35 -re "No hardware breakpoint support in the target.*$gdb_prompt $" {
36 unsupported "hardware breakpoints"
37 return
38 }
39 -re "Hardware breakpoints used exceeds limit.*$gdb_prompt $" {
40 unsupported "hardware breakpoints"
41 return
42 }
43 -re "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*$gdb_prompt $" {
44 pass "hardware breakpoint support"
45 }
46}
47gdb_run_cmd
48gdb_test_multiple "" "hardware breakpoint insertion" {
49 -re "Warning:\[\r\n\]+Cannot insert hardware breakpoint \[0-9\]+\.\[\r\n\]+Could not insert hardware breakpoints:\[\r\n\]+You may have requested too many hardware breakpoints/watchpoints\.\[\r\n\]+.*$gdb_prompt $" {
50 unsupported "hardware breakpoint insertion"
51 return
52 }
53 -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*\[\r\n\]+.*\[\t \]+if .argc.* \{.*$gdb_prompt $" {
54 pass "hardware breakpoint insertion"
55 }
56}
57delete_breakpoints
58
59#
60# Test simple hardware breakpoint setting commands.
61#
62
63#
64# Test break at function.
65#
66gdb_test "hbreak main" \
67 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
68 "hardware breakpoint function"
69delete_breakpoints
70
71#
72# Test break at quoted function.
73#
74gdb_test "hbreak \"marker2\"" \
75 "Hardware assisted breakpoint.*at.* file .*$srcfile1, line.*" \
76 "hardware breakpoint quoted function"
77delete_breakpoints
78
79#
80# Test break at function in file.
81#
82gdb_test "hbreak $srcfile:factorial" \
83 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
84 "hardware breakpoint function in file"
85delete_breakpoints
86
87set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
88
89#
90# Test break at line number.
91#
92# Note that the default source file is the last one whose source text
93# was printed. For native debugging, before we've executed the
94# program, this is the file containing main, but for remote debugging,
95# it's wherever the processor was stopped when we connected to the
96# board. So, to be sure, we do a list command.
97#
98gdb_test "list main" \
99 ".*main \\(argc, argv, envp\\).*" \
100 "use `list' to establish default source file"
101gdb_test "hbreak $bp_location1" \
102 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
103 "hardware breakpoint line number"
104delete_breakpoints
105
106set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
107
108#
109# Test break at line number in file.
110#
111gdb_test "hbreak $srcfile:$bp_location2" \
112 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \
113 "hardware breakpoint line number in file"
114delete_breakpoints
115
116set bp_location3 [gdb_get_line_number "set breakpoint 3 here"]
117set bp_location4 [gdb_get_line_number "set breakpoint 4 here"]
118
119#
120# Test putting a break at the start of a multi-line if conditional.
121# Verify the breakpoint was put at the start of the conditional.
122#
123gdb_test "hbreak multi_line_if_conditional" \
124 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location3\\." \
125 "hardware breakpoint at start of multi line if conditional"
126delete_breakpoints
127
128gdb_test "hbreak multi_line_while_conditional" \
129 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location4\\." \
130 "hardware breakpoint at start of multi line while conditional"
131
320b6f49
MR
132set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
133
134set main_line $bp_location6
135
136if {$hp_aCC_compiler} {
137 set proto "\\(int\\)"
138} else {
139 set proto ""
140}
141
142set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
143set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
144set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
145
146gdb_test "info break" \
147 "Num Type\[ \]+Disp Enb Address\[ \]+What.*
148\[0-9\]+\[\t \]+hw breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
149 "hardware breakpoint info"
150delete_breakpoints
151
152#
153# Run until the breakpoint at main is hit. For non-stubs-using targets.
154#
155gdb_test "hbreak main" \
156 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
157 "hardware breakpoint function (2)"
158gdb_run_cmd
159gdb_test "" \
160 "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*" \
161 "run until function breakpoint"
162delete_breakpoints
163
164#
165# Run until the breakpoint at a line number.
166#
167gdb_test "hbreak $bp_location1" \
168 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
169 "hardware breakpoint line number (2)"
170gdb_test "continue" \
171 "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
172 "run until breakpoint set at a line number"
173delete_breakpoints
174
175#
176# Run until the breakpoint set in a function in a file.
177#
178gdb_test "hbreak $srcfile:factorial" \
179 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
180 "hardware breakpoint function in file (2)"
181for {set i 6} {$i >= 1} {incr i -1} {
182 gdb_test "continue" \
183 "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:$bp_location7.*$bp_location7\[\t \]+.*if .value > 1. \{.*" \
184 "run until file:function($i) breakpoint"
185}
186delete_breakpoints
187
188#
189# Run until the breakpoint set at a quoted function.
190#
191gdb_test "hbreak \"marker2\"" \
192 "Hardware assisted breakpoint.*at.* file .*$srcfile1, line.*" \
193 "hardware breakpoint quoted function (2)"
194gdb_test "continue" \
195 "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*" \
196 "run until quoted breakpoint"
197delete_breakpoints
198#
199# Run until the file:function breakpoint at a line number in a file.
200#
201gdb_test "hbreak $srcfile:$bp_location2" \
202 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \
203 "hardware breakpoint line number in file (2)"
204gdb_test "continue" \
205 "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location2.*$bp_location2\[\t \]+argc = \\(argc == 12345\\);.*" \
206 "run until file:linenum breakpoint"
207delete_breakpoints
208
209# Test break at offset +1.
210set bp_location10 [gdb_get_line_number "set breakpoint 10 here"]
211
212gdb_test "hbreak +1" \
213 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \
214 "hardware breakpoint offset +1"
215
216# Check to see if breakpoint is hit when stepped onto.
217
218gdb_test "step" \
219 ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10.*$bp_location10\[\t \]+return argc;.*breakpoint 10 here.*" \
220 "step onto hardware breakpoint"
221delete_breakpoints
222
223# Check to see if breakpoint can be set on ending brace of function.
224set bp_location10a [gdb_get_line_number "set breakpoint 10a here"]
225
226gdb_test "hbreak $bp_location10a" \
227 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location10a\\." \
228 "setting hardware breakpoint at }"
229
230gdb_test "continue" \
231 ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10a.*$bp_location10a\[\t \]+}.*breakpoint 10a here.*" \
232 "continue to hardware breakpoint at }"
233
234#
235# Delete all breakpoints so we can start over, course this can be a test too.
236#
237delete_breakpoints
238
239#
240# Test temporary breakpoint at function.
241#
242
243gdb_test "thbreak main" \
244 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
245 "temporary hardware breakpoint function"
246delete_breakpoints
247
248#
249# Test break at function in file.
250#
251
252gdb_test "thbreak $srcfile:factorial" \
253 "Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
254 "temporary hardware breakpoint function in file"
255delete_breakpoints
256
257#
258# Test break at line number.
259#
260gdb_test "thbreak $bp_location1" \
261 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location1.*" \
262 "temporary hardware breakpoint line number #1"
263delete_breakpoints
264
265gdb_test "thbreak $bp_location6" \
266 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location6.*" \
267 "temporary hardware breakpoint line number #2"
268delete_breakpoints
269
270#
271# Test break at line number in file.
272#
273gdb_test "thbreak $srcfile:$bp_location2" \
274 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location2.*" \
275 "temporary hardware breakpoint line number in file #1"
276delete_breakpoints
277
278set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
279gdb_test "thbreak $srcfile:$bp_location11" \
280 "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location11.*" \
281 "temporary hardware breakpoint line number in file #2"
282
283#
284# Check to see what breakpoints are set (temporary this time).
285#
286gdb_test "info break" \
287 "Num Type.*Disp Enb Address.*What.*\[\r\n\]
288\[0-9\]+\[\t \]+hw breakpoint del.*y.*in main at .*$srcfile:$bp_location11.*" \
289 "temporary hardware breakpoint info"
290
291
292#***********
293
294if ![runto_main] then { fail "break tests suppressed" }
295
296# Verify that GDB responds gracefully when asked to set a breakpoint
297# on a nonexistent source line.
298#
299gdb_test_no_output "set breakpoint pending off"
300gdb_test "hbreak 999" \
301 "No line 999 in the current file." \
302 "hardware break on non-existent source line"
303
304# Run to the desired default location. If not positioned here, the
305# tests below don't work.
306#
307gdb_test "until $bp_location1" "main .* at .*:$bp_location1.*" \
308 "until bp_location1"
309
310
311# Verify that GDB allows one to just say "hbreak", which is treated
312# as the "default" breakpoint.
313#
314gdb_test "hbreak" "Hardware assisted breakpoint \[0-9\]*.*" \
315 "hardware break on default location"
316
317# Verify that a "silent" breakpoint can be set, and that GDB is indeed
318# "silent" about its triggering.
319#
320if ![runto_main] then { fail "break tests suppressed" }
321
322gdb_test_multiple "hbreak $bp_location1" \
323 "set to-be-silent hardware break bp_location1" {
324 -re "Hardware assisted breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $" {
325 pass "set to-be-silent hardware break bp_location1"
326 }
327 }
328
329gdb_test "commands $expect_out(1,string)\nsilent\nend" ">end" "set silent break bp_location1"
330
331gdb_test "info break $expect_out(1,string)" \
332 "\[0-9\]*\[ \t\]*hw breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*" \
333 "info silent hardware break bp_location1"
334
335gdb_test "continue" "Continuing." \
336 "hit silent hardware break bp_location1"
337
338gdb_test "bt" "#0 main .* at .*:$bp_location1.*" \
339 "stopped for silent hardware break bp_location1"
340
341# Verify that GDB can at least parse a breakpoint with the
342# "thread" keyword. (We won't attempt to test here that a
343# thread-specific breakpoint really triggers appropriately.
344# The gdb.threads subdirectory contains tests for that.)
345#
346set bp_location12 [gdb_get_line_number "set breakpoint 12 here"]
347gdb_test "hbreak $bp_location12 thread 999" "Unknown thread 999.*" \
348 "thread-specific hardware breakpoint on non-existent thread disallowed"
349
350gdb_test "hbreak $bp_location12 thread foo" \
351 "Junk after thread keyword.*" \
352 "thread-specific hardware breakpoint on bogus thread ID disallowed"
353
354# Verify that GDB responds gracefully to a breakpoint command with
355# trailing garbage.
356#
357gdb_test "hbreak $bp_location12 foo" \
40e084e1 358 "malformed linespec error: unexpected string, \"foo\".*" \
320b6f49
MR
359 "hardware breakpoint with trailing garbage disallowed"
360
361# Verify that GDB responds gracefully to a "clear" command that has
362# no matching breakpoint. (First, get us off the current source line,
363# which we know has a breakpoint.)
364#
365gdb_test "next" "marker1.*" "step over hardware breakpoint"
366
367gdb_test "clear 81" "No breakpoint at 81.*" \
368 "clear line has no breakpoint disallowed"
369
370gdb_test "clear" "No breakpoint at this line.*" \
371 "clear current line has no breakpoint disallowed"
372delete_breakpoints
373
374# Verify that a breakpoint can be set via a convenience variable.
375#
376gdb_test_no_output "set \$foo=$bp_location11" \
377 "set convenience variable \$foo to bp_location11"
378
379gdb_test "hbreak \$foo" \
380 "Hardware assisted breakpoint (\[0-9\]*) at .*, line $bp_location11.*" \
381 "set hardware breakpoint via convenience variable"
382delete_breakpoints
383
384# Verify that GDB responds gracefully to an attempt to set a
385# breakpoint via a convenience variable whose type is not integer.
386#
387gdb_test_no_output "set \$foo=81.5" \
388 "set convenience variable \$foo to 81.5"
389
390gdb_test "hbreak \$foo" \
391 "Convenience variables used in line specs must have integer values.*" \
392 "set hardware breakpoint via non-integer convenience variable disallowed"
393
394# Verify that we can set and trigger a breakpoint in a user-called function.
395#
396gdb_test "hbreak marker2" \
397 "Hardware assisted breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*" \
398 "set hardware breakpoint on to-be-called function"
399
400gdb_test "print marker2(99)" \
401 "The program being debugged stopped while in a function called from GDB.\r\nEvaluation of the expression containing the function\r\n.marker2$proto. will be abandoned.\r\nWhen the function is done executing, GDB will silently stop.*" \
402 "hit hardware breakpoint on called function"
403
404# As long as we're stopped (breakpointed) in a called function,
405# verify that we can successfully backtrace & such from here.
406#
407# In this and the following test, the _sr4export check apparently is needed
408# for hppa*-*-hpux.
409#
410gdb_test_multiple "bt" "backtrace while in called function" {
411 -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*_sr4export.*$gdb_prompt $" {
412 pass "backtrace while in called function"
413 }
414 -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*function called from gdb.*$gdb_prompt $" {
415 pass "backtrace while in called function"
416 }
417}
418
419# Return from the called function. For remote targets, it's important to do
420# this before runto_main, which otherwise may silently stop on the dummy
421# breakpoint inserted by GDB at the program's entry point.
422#
423gdb_test_multiple "finish" "finish from called function" {
424 -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.* in _sr4export.*$gdb_prompt $" {
425 pass "finish from called function"
426 }
427 -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*function called from gdb.*$gdb_prompt $" {
428 pass "finish from called function"
429 }
430 -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*Value returned.*$gdb_prompt $" {
431 pass "finish from called function"
432 }
433}
434
435#********
436
437
438#
439# Test "next" over recursive function call.
440#
441
442proc test_next_with_recursion {} {
443 global gdb_prompt
444 global decimal
445 global binfile
446
447 delete_breakpoints
448
449 # Can't set a hardware breakpoint without a live target, so do it now
450 # before it's killed below.
451 gdb_test "hbreak factorial" \
452 "Hardware assisted breakpoint $decimal at .*" \
453 "hardware break at factorial"
454
455 gdb_test "kill" "" "kill program" \
456 "Kill the program being debugged.*y or n. $" "y"
457
458 # Run until we call factorial with 6
459
460 gdb_run_cmd
461 if [gdb_test "" \
462 "Break.* factorial .value=6. .*" \
463 "run to factorial(6)"] then { gdb_suppress_tests }
464
465 # Continue until we call factorial recursively with 5.
466
467 if [gdb_test "continue" \
468 "Continuing.*Break.* factorial .value=5. .*" \
469 "continue to factorial(5)"] then { gdb_suppress_tests }
470
471 # Do a backtrace just to confirm how many levels deep we are.
472
473 if [gdb_test "backtrace" \
474 "#0\[ \t\]+ factorial .value=5..*" \
475 "backtrace from factorial(5)"] then { gdb_suppress_tests }
476
477 # Now a "next" should position us at the recursive call, which
478 # we will be performing with 4.
479
480 if [gdb_test "next" \
481 ".* factorial .value - 1.;.*" \
482 "next to recursive call"] then { gdb_suppress_tests }
483
484 # Disable the breakpoint at the entry to factorial by deleting them all.
485 # The "next" should run until we return to the next line from this
486 # recursive call to factorial with 4.
487 # Buggy versions of gdb will stop instead at the innermost frame on
488 # the line where we are trying to "next" to.
489
490 delete_breakpoints
491
492 if [istarget "mips*tx39-*"] {
493 set timeout 60
494 }
495 # We used to set timeout here for all other targets as well. This
496 # is almost certainly wrong. The proper timeout depends on the
497 # target system in use, and how we communicate with it, so there
498 # is no single value appropriate for all targets. The timeout
499 # should be established by the Dejagnu config file(s) for the
500 # board, and respected by the test suite.
501 #
502 # For example, if I'm running GDB over an SSH tunnel talking to a
503 # portmaster in California talking to an ancient 68k board running
504 # a crummy ROM monitor (a situation I can only wish were
505 # hypothetical), then I need a large timeout. But that's not the
506 # kind of knowledge that belongs in this file.
507
508 gdb_test next "\[0-9\]*\[\t \]+return \\(value\\);.*" \
509 "next over recursive call"
510
511 # OK, we should be back in the same stack frame we started from.
512 # Do a backtrace just to confirm.
513
514 set result [gdb_test "backtrace" \
515 "#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
516 "backtrace from factorial(5.1)"]
517 if { $result != 0 } { gdb_suppress_tests }
518
519 if [target_info exists gdb,noresults] { gdb_suppress_tests }
520 gdb_continue_to_end "recursive next test"
4ec70201 521 gdb_stop_suppressing_tests
320b6f49
MR
522}
523
524test_next_with_recursion
525
526
527#********
528
529# Build a new file with optimization enabled so that we can try breakpoints
530# on targets with optimized prologues.
531
532if { [prepare_for_testing hbreak2.exp "hbreak2o2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
533 return -1
534}
535
536if ![runto_main] then { fail "break tests suppressed" }
537delete_breakpoints
538
539#
540# Test break at function.
541#
542gdb_test "hbreak main" \
543 "Hardware assisted breakpoint.*at.* file .*, line.*" \
544 "hardware breakpoint function, optimized file"
545
546#
547# Run until the breakpoint at main is hit. For non-stubs-using targets.
548#
549gdb_run_cmd
550gdb_test_multiple "" "run until hardware function breakpoint, optimized file" {
551 -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $" {
552 pass "run until hardware function breakpoint, optimized file"
553 }
554 -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $" {
555 pass "run until hardware function breakpoint, optimized file (code motion)"
556 }
557}
558delete_breakpoints
559
560#
561# Test break at function.
562#
563gdb_test "hbreak marker4" \
564 "Hardware assisted breakpoint.*at.* file .*$srcfile1, line.*" \
565 "hardware breakpoint small function, optimized file"
566
567#
568# Run until the breakpoint at a small function.
569#
570
571#
572# Add a second pass pattern. The behavior differs here between stabs
573# and dwarf for one-line functions. Stabs preserves two line symbols
574# (one before the prologue and one after) with the same line number,
575# but dwarf regards these as duplicates and discards one of them.
576# Therefore the address after the prologue (where the breakpoint is)
577# has no exactly matching line symbol, and GDB reports the breakpoint
578# as if it were in the middle of a line rather than at the beginning.
579
580set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
581set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
582
583gdb_test_multiple "continue" \
584 "run until hardware breakpoint set at small function, optimized file" {
585 -re "Breakpoint $decimal, marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
586 pass "run until hardware breakpoint set at small function, optimized file"
587 }
588 -re "Breakpoint $decimal, $hex in marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
589 pass "run until hardware breakpoint set at small function, optimized file"
590 }
591 -re "Breakpoint $decimal, marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*" {
592 # marker4() is defined at line 46 when compiled with -DPROTOTYPES
593 pass "run until hardware breakpoint set at small function, optimized file (line bp_location14)"
594 }
595 -re "Breakpoint $decimal, factorial \\(.*\\) .*\{\r\n$gdb_prompt" {
596 # GCC 4.3 emits bad line number information - see gcc/36748.
597 if { [test_compiler_info "gcc-4-3-*"] } {
598 setup_xfail *-*-*
599 }
600 fail "run until hardware breakpoint set at small function, optimized file"
601 }
602}