aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp39
2 files changed, 29 insertions, 15 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0b41e3d7..5655a15 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15 Simon Marchi <simon.marchi@ericsson.com>
+
+ * lib/gdb.exp (default_gdb_start): After starting gdb, loop
+ as long as we get pagination notifications.
+
2014-12-15 Jason Merrill <jason@redhat.com>
* Makefile.in (check-gdb.%): Restore.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6a13d1e..3a3a396 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1451,7 +1451,7 @@ proc default_gdb_spawn { } {
# Default gdb_start procedure.
proc default_gdb_start { } {
- global gdb_prompt
+ global gdb_prompt pagination_prompt
global gdb_spawn_id
if [info exists gdb_spawn_id] {
@@ -1466,20 +1466,29 @@ proc default_gdb_start { } {
# When running over NFS, particularly if running many simultaneous
# tests on different hosts all using the same server, things can
# get really slow. Give gdb at least 3 minutes to start up.
- gdb_expect 360 {
- -re "\[\r\n\]$gdb_prompt $" {
- verbose "GDB initialized."
- }
- -re "$gdb_prompt $" {
- perror "GDB never initialized."
- unset gdb_spawn_id
- return -1
- }
- timeout {
- perror "(timeout) GDB never initialized after 10 seconds."
- remote_close host
- unset gdb_spawn_id
- return -1
+ set loop_again 1
+ while { $loop_again } {
+ set loop_again 0
+ gdb_expect 360 {
+ -re "$pagination_prompt" {
+ verbose "Hit pagination during startup. Pressing enter to continue."
+ send_gdb "\n"
+ set loop_again 1
+ }
+ -re "\[\r\n\]$gdb_prompt $" {
+ verbose "GDB initialized."
+ }
+ -re "$gdb_prompt $" {
+ perror "GDB never initialized."
+ unset gdb_spawn_id
+ return -1
+ }
+ timeout {
+ perror "(timeout) GDB never initialized after 10 seconds."
+ remote_close host
+ unset gdb_spawn_id
+ return -1
+ }
}
}