From: Jan Kratochvil Date: Fri, 28 Oct 2011 17:32:30 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a3dad982f5399fb86a5ea5a7fb1ba203c3c03e0;p=binutils-gdb.git gdb/testsuite/ * gdb.base/async-shell.exp: Skip the testfile for use_gdb_stub. * gdb.base/attach-pie-misread.exp: Likewise. * gdb.base/break-interp.exp: Likewise. * gdb.base/default.exp (attach, run "r" abbreviation, run): Skip these testcases for use_gdb_stub. * gdb.dwarf2/dw2-restore.exp: Fix the run for use_gdb_stub. (continue): New testcase. * gdb.python/py-events.exp: Skip the testfile for use_gdb_stub. * gdb.threads/attach-into-signal.exp: Likewise. * gdb.threads/attach-stopped.exp: Likewise. * gdb.threads/attachstop-mt.exp: Likewise. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 82c1a592437..f26044b7122 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,15 +1,27 @@ +2011-10-28 Jan Kratochvil + + * gdb.base/async-shell.exp: Skip the testfile for use_gdb_stub. + * gdb.base/attach-pie-misread.exp: Likewise. + * gdb.base/break-interp.exp: Likewise. + * gdb.base/default.exp (attach, run "r" abbreviation, run): Skip these + testcases for use_gdb_stub. + * gdb.dwarf2/dw2-restore.exp: Fix the run for use_gdb_stub. + (continue): New testcase. + * gdb.python/py-events.exp: Skip the testfile for use_gdb_stub. + * gdb.threads/attach-into-signal.exp: Likewise. + * gdb.threads/attach-stopped.exp: Likewise. + * gdb.threads/attachstop-mt.exp: Likewise. + 2011-10-28 Paul Koning * gdb.python/lib-types.exp (deep_items): Rename from deepitems. - 2011-10-27 Jan Kratochvil * lib/mi-support.exp (breakpoint_re): Suppress match reporting. (mi_gdb_test): Import globals thread_selected_re and breakpoint_re. Expect them optionally at the regex start. - 2011-10-27 Doug Evans * gdb.python/python.exp: Test source -s. diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp index a1eb3147470..27bab64c54f 100644 --- a/gdb/testsuite/gdb.base/async-shell.exp +++ b/gdb/testsuite/gdb.base/async-shell.exp @@ -20,6 +20,11 @@ if { ![support_displaced_stepping] } { return -1 } +# The testfile uses "run". The real bug happened only for ![is_remote target]. +if [target_info exists use_gdb_stub] { + return 0 +} + if { [prepare_for_testing ${testfile}.exp ${testfile}] } { return -1 } diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp index d97ed8f2655..6a11fc5db03 100644 --- a/gdb/testsuite/gdb.base/attach-pie-misread.exp +++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp @@ -14,7 +14,8 @@ # along with this program. If not, see . # This test only works on GNU/Linux. -if { ![isnative] || [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} { +if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub] + || ![istarget *-linux*] || [skip_shlib_tests]} { continue } diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 47a6f8cd07e..d60bc718e09 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -14,7 +14,8 @@ # along with this program. If not, see . # This test only works on GNU/Linux. -if { ![isnative] || [is_remote host] || ![istarget *-linux*] || [skip_shlib_tests]} { +if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub] + || ![istarget *-linux*] || [skip_shlib_tests]} { continue } diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index 44dd71105cf..4b7a8f5c1b4 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -39,23 +39,23 @@ gdb_test "append value" "Missing filename\." gdb_test "append binary memory" "Missing filename\." gdb_test "append binary value" "Missing filename\." -setup_xfail "mips-idt-*" -gdb_test_multiple "attach" "attach" { - -re "Argument required .(process-id|program) to attach.*$gdb_prompt $"\ - { pass "attach" } - -re "You can't do that when your target is `None'.*$gdb_prompt $"\ - { pass "attach" } - -re "You can't do that without a process to debug.*$gdb_prompt $"\ - { pass "attach" } - -re "Don't know how to attach. Try \"help target\"..*$gdb_prompt $"\ - { pass "attach" } - -re "Kill it. .y or n." { - send_gdb "y\n" - exp_continue +if ![target_info exists use_gdb_stub] { + setup_xfail "mips-idt-*" + gdb_test_multiple "attach" "attach" { + -re "Argument required .(process-id|program) to attach.*$gdb_prompt $"\ + { pass "attach" } + -re "You can't do that when your target is `None'.*$gdb_prompt $"\ + { pass "attach" } + -re "You can't do that without a process to debug.*$gdb_prompt $"\ + { pass "attach" } + -re "Don't know how to attach. Try \"help target\"..*$gdb_prompt $"\ + { pass "attach" } + -re "Kill it. .y or n." { + send_gdb "y\n" + exp_continue + } } -} -if ![target_info exists use_gdb_stub] { gdb_test "break" "No default breakpoint address now." "break" foreach i "b br bre brea" { gdb_test $i "No default breakpoint address now." "break \"$i\" abbreviation" @@ -420,7 +420,9 @@ gdb_test "ptype" "The history is empty." "ptype" gdb_test "pwd" "Working directory .*" "pwd" #test run "r" abbreviation -if [istarget "*-*-vxworks*"] then { +if [target_info exists use_gdb_stub] { + # Only extended-remote supports "run". +} elseif [istarget "*-*-vxworks*"] then { gdb_test "set args" ".*" "" gdb_test "r" "Starting program: .* @@ -446,7 +448,9 @@ You must specify a function name to run, and arguments if any"\ } #test run -if [istarget "*-*-vxworks*"] then { +if [target_info exists use_gdb_stub] { + # Only extended-remote supports "run". +} elseif [istarget "*-*-vxworks*"] then { gdb_test "set args" ".*" "" gdb_test "run" "Starting program: .* diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp index e64c5e590bf..50225b87906 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp @@ -33,5 +33,8 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -gdb_test "run" ".*" -gdb_test "where" ".*$hex in foo ().+$hex in _start ().*" +if ![runto foo] { + return 0 +} +gdb_test "continue" "$hex in foo \\(\\)" +gdb_test "where" "#0 +$hex in foo \\(\\)\r\n#1 +$hex in _start \\(\\)" diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp index e4203899f5e..02f4bc96048 100644 --- a/gdb/testsuite/gdb.python/py-events.exp +++ b/gdb/testsuite/gdb.python/py-events.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if [target_info exists use_gdb_stub] { + return 0 +} + if $tracelevel then { strace $tracelevel } diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index 4adf2b7d29f..a5ea36e0d10 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -17,7 +17,8 @@ # This file was created by Jan Kratochvil . # This test only works on Linux -if { ![isnative] || [is_remote host] || ![istarget *-linux*] } { +if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub] + || ![istarget *-linux*] } { continue } diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp index 08a943746d2..3fabb032f82 100644 --- a/gdb/testsuite/gdb.threads/attach-stopped.exp +++ b/gdb/testsuite/gdb.threads/attach-stopped.exp @@ -18,7 +18,8 @@ # This file was updated by Jan Kratochvil . # This test only works on Linux -if { ![isnative] || [is_remote host] || ![istarget *-linux*] } { +if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub] + || ![istarget *-linux*] } { continue } diff --git a/gdb/testsuite/gdb.threads/attachstop-mt.exp b/gdb/testsuite/gdb.threads/attachstop-mt.exp index 12bf960f307..c939f35f3b5 100644 --- a/gdb/testsuite/gdb.threads/attachstop-mt.exp +++ b/gdb/testsuite/gdb.threads/attachstop-mt.exp @@ -17,7 +17,8 @@ # and Jan Kratochvil . # This test only works on Linux -if { ![isnative] || [is_remote host] || ![istarget *-linux*] } { +if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub] + || ![istarget *-linux*] } { continue }