diff options
author | Tom Tromey <tromey@redhat.com> | 2013-06-27 18:49:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-06-27 18:49:03 +0000 |
commit | f76495c88cccb9a601a19534c87f817d9d2255c1 (patch) | |
tree | fb589607d6edfcbea3500146fc7b1f732783e868 /gdb/testsuite/gdb.base/condbreak.exp | |
parent | a64d25307da684e22f98b1bc19db43fb7d104999 (diff) | |
download | gdb-f76495c88cccb9a601a19534c87f817d9d2255c1.zip gdb-f76495c88cccb9a601a19534c87f817d9d2255c1.tar.gz gdb-f76495c88cccb9a601a19534c87f817d9d2255c1.tar.bz2 |
test suite update - gdb.base/[cd]
Convert files gdb.base/[cd]*.exp to use standard_output_file et al.
* call-ar-st.exp, call-rt-st.exp, call-sc.exp,
call-signal-resume.exp, call-strs.exp, callexit.exp,
callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
commands.exp, completion.exp, complex.exp, cond-expr.exp,
condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.
Diffstat (limited to 'gdb/testsuite/gdb.base/condbreak.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/condbreak.exp | 76 |
1 files changed, 30 insertions, 46 deletions
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp index c09228c..faccb5b 100644 --- a/gdb/testsuite/gdb.base/condbreak.exp +++ b/gdb/testsuite/gdb.base/condbreak.exp @@ -21,46 +21,30 @@ # test running programs # -set testfile "break" -set srcfile ${testfile}.c -set srcfile1 ${testfile}1.c -set binfile ${objdir}/${subdir}/${testfile} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } { - untested condbreak.exp - return -1 -} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } { - untested condbreak.exp - return -1 -} +standard_testfile break.c break1.c -if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } { - untested condbreak.exp - return -1 +if {[prepare_for_testing ${testfile}.exp $testfile [list $srcfile $srcfile2] \ + {debug nowarnings}]} { + return -1 } if [get_compiler_info] { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${binfile} set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] -set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1] -set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1] -set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1] -set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1] -set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1] -set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1] -set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1] +set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2] +set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile2] +set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2] +set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2] +set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2] +set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2] +set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2] +set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2] # # test break at function @@ -73,7 +57,7 @@ gdb_test "break main" \ # test conditional break at function # gdb_test "break marker1 if 1==1" \ - "Breakpoint.*at.* file .*$srcfile1, line.*" + "Breakpoint.*at.* file .*$srcfile2, line.*" gdb_test_no_output "delete 2" @@ -89,7 +73,7 @@ gdb_test_no_output "delete 3" # test conditional break at function # gdb_test "break marker1 if (1==1)" \ - "Breakpoint.*at.* file .*$srcfile1, line.*" + "Breakpoint.*at.* file .*$srcfile2, line.*" # # test conditional break at line number @@ -98,16 +82,16 @@ gdb_test "break $srcfile:$bp_location1 if (1==1)" \ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." gdb_test "break marker2 if (a==43)" \ - "Breakpoint.*at.* file .*$srcfile1, line.*" + "Breakpoint.*at.* file .*$srcfile2, line.*" # # Check break involving inferior function call. # Ensure there is at least one additional breakpoint with higher VMA. # gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \ - "Breakpoint.*at.* file .*$srcfile1, line.*" + "Breakpoint.*at.* file .*$srcfile2, line.*" gdb_test "break marker4" \ - "Breakpoint.*at.* file .*$srcfile1, line.*" + "Breakpoint.*at.* file .*$srcfile2, line.*" # # check to see what breakpoints are set @@ -129,15 +113,15 @@ if {$hp_aCC_compiler} { gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile2:($bp_location15|$bp_location16).* \[\t \]+stop only if \\(1==1\\).* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.* \[\t \]+stop only if \\(1==1\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile2:($bp_location8|$bp_location9).* \[\t \]+stop only if \\(a==43\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile2:($bp_location17|$bp_location18).* \[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \ +\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile2:($bp_location13|$bp_location14).*" \ "breakpoint info" @@ -195,10 +179,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=. # # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior. gdb_test_multiple "continue" "run until breakpoint at marker1" { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { pass "run until breakpoint at marker1" } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { xfail "run until breakpoint at marker1" } } @@ -207,10 +191,10 @@ gdb_test_multiple "continue" "run until breakpoint at marker1" { # Same issues here as above. setup_xfail hppa2.0w-*-* 11512CLLbs gdb_test_multiple "continue" "run until breakpoint at marker2" { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { pass "run until breakpoint at marker2" } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { xfail "run until breakpoint at marker2" } } @@ -244,20 +228,20 @@ gdb_test "break *main if (1==1) ta 999" \ set test "run until breakpoint at marker3" gdb_test_multiple "continue" $test { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { pass $test } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { xfail $test } } set test "run until breakpoint at marker4" gdb_test_multiple "continue" $test { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { pass $test } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { xfail $test } } |