From 9ecfcd1d02e8e92457e7a81d060b8d0d46bb68bd Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Thu, 23 Oct 2014 13:56:52 +0000 Subject: [PATCH] Eliminate literal line numbers in so-impl-ld.exp Remove literal line numbers from the regexps in so-impl-ld.exp. Add appropriate eye-catchers to solib1.c and refer to those instead. gdb/testsuite/ChangeLog: * gdb.base/solib1.c: Add eye-catchers. * gdb.base/so-impl-ld.exp: Match against eye-catchers instead of literal line numbers. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/so-impl-ld.exp | 4 ++-- gdb/testsuite/gdb.base/solib1.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ae7c53c8f0a..d0f1b84a634 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-11-13 Andreas Arnez + + * gdb.base/solib1.c: Add eye-catchers. + * gdb.base/so-impl-ld.exp: Match against eye-catchers instead of + literal line numbers. + 2014-11-12 Pedro Alves * gdb.threads/leader-exit.exp: Test sending ctrl-c works after the diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp index 073c3dfb9b3..3788b6c7113 100644 --- a/gdb/testsuite/gdb.base/so-impl-ld.exp +++ b/gdb/testsuite/gdb.base/so-impl-ld.exp @@ -61,12 +61,12 @@ gdb_test "next" "21\[ \t\]*result = solib_main .result.;" \ # Verify that we can step into the second shlib call. # -gdb_test "step" "solib_main .arg=10000. at.*${libfile}.c:17.*" \ +gdb_test "step" "solib_main .arg=10000. at.*${libfile}.c:${decimal}.* HERE .*" \ "step into solib call" # Verify that we can step within the shlib call. # -gdb_test "next" "18\[ \t\]*\}" "step in solib call" +gdb_test "next" "${decimal}\[ \t\]*\}.* STEP .*" "step in solib call" # Verify that we can step out of the shlib call, and back out into # the caller. diff --git a/gdb/testsuite/gdb.base/solib1.c b/gdb/testsuite/gdb.base/solib1.c index 2e517504505..224a93d7a40 100644 --- a/gdb/testsuite/gdb.base/solib1.c +++ b/gdb/testsuite/gdb.base/solib1.c @@ -14,5 +14,5 @@ int solib_main (arg) #endif #endif { - return arg*arg; -} + return arg*arg; /* HERE */ +} /* STEP */ -- 2.30.2