diff mbox

[09/16] Eliminate literal line numbers in mi-console.exp

Message ID 1414598446-13831-9-git-send-email-arnez@linux.vnet.ibm.com
State New
Headers show

Commit Message

Andreas Arnez Oct. 29, 2014, 4 p.m. UTC
Remove the literal line number from a regexp in mi-console.exp.  Add
an appropriate eye-catcher to mi-console.c and refer to that instead.

gdb/testsuite/ChangeLog:

	* gdb.mi/mi-console.c: Add eye-catcher.
	* gdb.mi/mi-console.exp (semihosted_string): Refer to eye-catcher
	instead of literal line number.
---
 gdb/testsuite/gdb.mi/mi-console.c   | 2 +-
 gdb/testsuite/gdb.mi/mi-console.exp | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-console.c b/gdb/testsuite/gdb.mi/mi-console.c
index ffed9f0..0cd2243 100644
--- a/gdb/testsuite/gdb.mi/mi-console.c
+++ b/gdb/testsuite/gdb.mi/mi-console.c
@@ -11,4 +11,4 @@  int
 main ()
 {
   hello ();
-}
+} /* after-hello */
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index a98cba3..86645c0 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -89,7 +89,8 @@  mi_gdb_test "220-exec-next" \
 	    "Testing console output" \
 	    $output
 
-mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" "14" "" \
+set line [gdb_get_line_number "after-hello"]
+mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" $line "" \
     "finished step over hello"
     
 mi_gdb_exit