Eliminate literal line numbers in mi-console.exp

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.
This commit is contained in:
Andreas Arnez 2014-10-28 15:19:08 +00:00 committed by Andreas Krebbel
parent b0e59b8f1c
commit d1fbcd564a
3 changed files with 9 additions and 2 deletions

View 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.

View File

@ -11,4 +11,4 @@ int
main ()
{
hello ();
}
} /* after-hello */

View 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