mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
* gdb.base/break.exp: Change test that deletes all breakpoints
when no user breakpoints are installed. A post 4.15 change causes gdb to no longer prompt in this case.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Wed Nov 1 15:57:16 1995 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
* gdb.base/break.exp: Change test that deletes all breakpoints
|
||||||
|
when no user breakpoints are installed. A post 4.15 change
|
||||||
|
causes gdb to no longer prompt in this case.
|
||||||
|
|
||||||
Tue Oct 31 15:13:43 1995 Fred Fish <fnf@cygnus.com>
|
Tue Oct 31 15:13:43 1995 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
* gdb.base/return.exp (return_tests): Change xfail for test
|
* gdb.base/return.exp (return_tests): Change xfail for test
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
# Please email any bugs, comments, and/or additions to this file to:
|
# Please email any bugs, comments, and/or additions to this file to:
|
||||||
# bug-gdb@prep.ai.mit.edu
|
# bug-gdb@prep.ai.mit.edu
|
||||||
@ -56,28 +56,24 @@ if $usestubs {
|
|||||||
# test simple breakpoint setting commands
|
# test simple breakpoint setting commands
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
# Test deleting all breakpoints when there are none installed.
|
||||||
# test deleting all breakpoints; note that gdb-init.exp provides a
|
# Between 4.15 and 4.16 a change made gdb stop prompting when
|
||||||
# "delete_breakpoints" proc for general use elsewhere
|
# there are no user breakpoints installed.
|
||||||
#
|
# Note that gdb-init.exp provides a "delete_breakpoints" proc
|
||||||
|
# for general use elsewhere.
|
||||||
|
|
||||||
send "delete breakpoints\n"
|
send "delete breakpoints\n"
|
||||||
expect {
|
expect {
|
||||||
-re "Delete all breakpoints.*y or n. $"\
|
-re "Delete all breakpoints.*y or n. $"\
|
||||||
{ send "y\n"
|
{ send "y\n"
|
||||||
expect {
|
expect {
|
||||||
-re ".*$prompt $"\
|
-re ".*$prompt $" {}
|
||||||
{ send "info breakpoints\n"
|
timeout { fail "Delete all breakpoints when none (timeout)" }
|
||||||
expect {
|
|
||||||
-re "No breakpoints or watchpoints..*$prompt $" { pass "Deleted all breakpoints" }
|
|
||||||
-re ".*$prompt $" { fail "Deleted all breakpoints" }
|
|
||||||
timeout { fail "Deleted all breakpoints" }
|
|
||||||
}
|
}
|
||||||
|
fail "Delete all breakpoints when none (known pre 4.16 bug)"
|
||||||
}
|
}
|
||||||
timeout { fail "Deleted all breakpoints" }
|
-re ".*$prompt $" { pass "Delete all breakpoints when none" }
|
||||||
}
|
timeout { fail "Delete all breakpoints when none" }
|
||||||
}
|
|
||||||
-re ".*$prompt $" { fail "Deleted all breakpoints" }
|
|
||||||
timeout { fail "Deleted all breakpoints" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -119,9 +115,15 @@ gdb_test "break $srcfile:70" \
|
|||||||
#
|
#
|
||||||
# check to see what breakpoints are set
|
# check to see what breakpoints are set
|
||||||
#
|
#
|
||||||
|
if $usestubs then {
|
||||||
|
set main_line 57
|
||||||
|
} else {
|
||||||
|
set main_line 60
|
||||||
|
}
|
||||||
|
|
||||||
gdb_test "info break" \
|
gdb_test "info break" \
|
||||||
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
|
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
|
||||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:57.*
|
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
|
||||||
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:76.*
|
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:76.*
|
||||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
|
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
|
||||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
|
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
|
||||||
@ -146,6 +148,10 @@ if !$usestubs then {
|
|||||||
send "run\n"
|
send "run\n"
|
||||||
}
|
}
|
||||||
expect {
|
expect {
|
||||||
|
-re "The program .* has been started already.*y or n. $" {
|
||||||
|
send "y\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
-re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:60.*60\[\t \]+if .argc.* \{.*$prompt $"\
|
-re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:60.*60\[\t \]+if .argc.* \{.*$prompt $"\
|
||||||
{ pass "run until function breakpoint" }
|
{ pass "run until function breakpoint" }
|
||||||
-re ".*$prompt $" { fail "run until function breakpoint" }
|
-re ".*$prompt $" { fail "run until function breakpoint" }
|
||||||
@ -153,8 +159,6 @@ if !$usestubs then {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if $usestubs {}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# run until the breakpoint at a line number
|
# run until the breakpoint at a line number
|
||||||
#
|
#
|
||||||
@ -244,7 +248,7 @@ gdb_test "tbreak $srcfile:66" "Breakpoint.*at.* file .*$srcfile, line 66.*" "Te
|
|||||||
send "info break\n"
|
send "info break\n"
|
||||||
expect {
|
expect {
|
||||||
-re "Num Type.*Disp Enb Address.*What.*
|
-re "Num Type.*Disp Enb Address.*What.*
|
||||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:57.*
|
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*
|
||||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:76.*
|
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:76.*
|
||||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:64.*
|
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:64.*
|
||||||
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:70.*$prompt $" {
|
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:70.*$prompt $" {
|
||||||
@ -342,7 +346,10 @@ proc test_next_with_recursion {} {
|
|||||||
if $result!=0 then { return }
|
if $result!=0 then { return }
|
||||||
|
|
||||||
# Continue until we exit. Should not stop again.
|
# Continue until we exit. Should not stop again.
|
||||||
gdb_test "continue" "Continuing.\r\n720\r\n\r\nProgram exited normally\\."\
|
# Don't bother to check the output of the program, that may be
|
||||||
|
# extremely tough for some remote systems.
|
||||||
|
gdb_test "continue"\
|
||||||
|
"Continuing.\[\r\n0-9\]+Program exited normally\\."\
|
||||||
"continue until exit in recursive next test"
|
"continue until exit in recursive next test"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user