Eliminate literal line numbers in shlib-call.exp
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 24 Oct 2014 12:05:10 +0000 (12:05 +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 shlib-call.exp.  Add
an appropriate eye-catcher to shr2.c and refer to that instead.

gdb/testsuite/ChangeLog:

* gdb.base/shr2.c: Add eye-catcher.
* gdb.base/shlib-call.exp: Refer to eye-catcher instead of literal
line number.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/shlib-call.exp
gdb/testsuite/gdb.base/shr2.c

index f1ef4bb4072b03eb3373d2e5dc197d731221f82e..0ab82256a1d640743da518357459e13ec9a82cb0 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * gdb.base/shr2.c: Add eye-catcher.
+       * gdb.base/shlib-call.exp: Refer to eye-catcher instead of literal
+       line number.
+
 2014-11-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * gdb.base/jump.c: Add eye-catchers.
index 74a54299bd0e568ba6dacbdb329e9299aa076118..aca03083f07601a68e79cf12871495ea9fb375b4 100644 (file)
@@ -111,7 +111,7 @@ gdb_test "break shr2" \
     "breakpoint function shr2"
 
 gdb_test "continue" \
-       "Continuing\\..*Breakpoint \[0-9\]+, shr2 \\(.*\\) at.*shr2\\.c:7.*7.*return 2.x;" \
+       "Continuing\\..*Breakpoint ${decimal}, shr2 \\(.*\\) at.*shr2\\.c:${decimal}.*shr2-return \\*\\/" \
        "run until breakpoint set at a function"
 
 
index de34986d76d57ac433b04f7995ad46cf114de104..36a71b3554dc04dc93fbb94d237d725b1e04065c 100644 (file)
@@ -4,7 +4,7 @@ int shr2(int x)
 int shr2(x) int x;
 #endif
 {
-  return 2*x;
+  return 2*x;                  /* shr2-return */
 }
 
 #ifdef PROTOTYPES