From: Andreas Arnez Date: Tue, 28 Oct 2014 15:19:08 +0000 (+0000) Subject: Eliminate literal line numbers in mi-console.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1fbcd564ab192434686588b9ff0853e158afbfc;p=binutils-gdb.git 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0ab82256a1d..7daae899ff4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-11-13 Andreas Arnez + + * 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 * gdb.base/shr2.c: Add eye-catcher. diff --git a/gdb/testsuite/gdb.mi/mi-console.c b/gdb/testsuite/gdb.mi/mi-console.c index ffed9f0df05..0cd2243c4f2 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 a98cba372a8..86645c0d2b9 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