aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp18
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp6
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp4
-rw-r--r--gdb/testsuite/gdb.base/pointers.exp39
4 files changed, 40 insertions, 27 deletions
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 115dcb3..0acd139 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -128,12 +128,18 @@ gdb_expect {
send_gdb "finish\n"
gdb_expect {
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" {
- pass "finish out from loop_count (line 617)"}
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" {
- pass "finish out from loop_count (line 615)"}
- -re ".*$gdb_prompt $" { fail "finish out from loop_count"}
- timeout { fail "(timeout)finish out from loop_count"}
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 617)"
+ }
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 615)"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "finish out from loop_count"
+ }
+ timeout {
+ fail "finish out from loop_count (timeout)"
+ }
}
# Ask GDB to print the value of EXPR, and expect to see the regexp
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 9183fe4..7a5f143 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -342,7 +342,8 @@ if ![gdb_test "bt 2" \
# Call function (causing a breakpoint hit in the call dummy) and do a finish,
# make sure we are back at main and still have the same register contents.
-gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
+gdb_test "print add(4,5)" "The program being debugged stopped while.*" \
+ "call function causing a breakpoint then do a finish"
gdb_test "finish" \
"Value returned is .* = 9" \
"finish from call dummy breakpoint returns correct value"
@@ -360,7 +361,8 @@ if ![gdb_test "bt 2" \
# Call function (causing a breakpoint hit in the call dummy) and do a return
# with a value, make sure we are back at main with the same register contents.
-gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
+gdb_test "print add(4,5)" "The program being debugged stopped while.*" \
+ "call function causing a breakpoint and then do a return"
if ![gdb_test "return 7" \
"#0 main.*" \
"back at main after return from call dummy breakpoint" \
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index f89e142..3960f06 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -74,7 +74,7 @@ if [target_info exists use_gdb_stub] {
gdb_test "cle" ".*Deleted breakpoints 2 1.*" "clear worked"
send_gdb "i b\n"
gdb_expect {
- -re ".*breakpoint.*breakpoint.*$gdb_prompt $" {
+ -re ".* breakpoint .* breakpoint .*$gdb_prompt $" {
fail "cleared bp at line before routine"
}
-re ".*3.*main.*31.*$gdb_prompt $" {
@@ -120,7 +120,7 @@ gdb_expect {
send_gdb "i b\n"
gdb_expect {
- -re ".*breakpoint.*breakpoint.*$gdb_prompt $" {
+ -re ".* breakpoint .* breakpoint .*$gdb_prompt $" {
fail "all set to continue (didn't clear bps)"
}
-re ".*3.*main.*31.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp
index 5f406ad..a10a7f3 100644
--- a/gdb/testsuite/gdb.base/pointers.exp
+++ b/gdb/testsuite/gdb.base/pointers.exp
@@ -366,23 +366,28 @@ gdb_expect {
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*more_code.*$gdb_prompt $" {
- pass "up from marker1"
- }
- -re ".*$gdb_prompt $" {
- fail "up from marker1"
- }
- timeout { fail "up from marker1 (timeout)" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
+send_gdb "cont\n"
+gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ pass "continue to marker1"
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*more_code.*$gdb_prompt $" {
+ pass "up from marker1"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "up from marker1"
+ }
+ timeout { fail "up from marker1 (timeout)" }
+ }
+ }
+ -re "$gdb_prompt $" {
+ fail "continue to marker1"
}
+ timeout {
+ fail "continue to marker1 (timeout)"
+ }
+}
send_gdb "print *pUC\n"
@@ -568,7 +573,7 @@ gdb_expect {
send_gdb "ptype pppC\n"
gdb_expect {
- -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" }
+ -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" }
-re ".*$gdb_prompt $" { fail "ptype pppC" }
timeout { fail "(timeout) ptype pppC" }
}