Eliminate literal line numbers in mi-console.exp
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 28 Oct 2014 15:19:08 +0000 (15:19 +0000)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Thu, 13 Nov 2014 09:20:39 +0000 (10:20 +0100)
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/ChangeLog
gdb/testsuite/gdb.mi/mi-console.c
gdb/testsuite/gdb.mi/mi-console.exp

index 0ab82256a1d640743da518357459e13ec9a82cb0..7daae899ff4754222744d157378c6bca5bbed052 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * gdb.mi/mi-console.c: Add eye-catcher.
+       * gdb.mi/mi-console.exp (semihosted_string): Refer to eye-catcher
+       instead of literal line number.
+
 2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * gdb.base/shr2.c: Add eye-catcher.
index ffed9f0df051863d4f14a88cf6e758cffad9e07d..0cd2243c4f25fbb5af603340d3657b8740a81446 100644 (file)
@@ -11,4 +11,4 @@ int
 main ()
 {
   hello ();
-}
+} /* after-hello */
index a98cba372a8bcdfe30f1b2498a7b29c51f7a4813..86645c0d2b966416647ab30d0a71e384ec9216b8 100644 (file)
@@ -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