Share the "multi_line" helper among all testcases
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.btrace / instruction_history.exp
index a7b57e53f977c87c72ce83f4b4ee161a466ae511..ba06647f9ab0a16160f29f20c4917da60ebec4ba 100644 (file)
@@ -65,37 +65,37 @@ if { $traced != 11 } {
 }
 
 # test that we see the expected instructions
-gdb_test "record instruction-history 3,7" [join [list \
+gdb_test "record instruction-history 3,7" [multi_line \
   "3\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "4\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tdec    %eax" \
   "5\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "6\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
   "7\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
-  ] "\r\n"]
+  ]
 
-gdb_test "record instruction-history /f 3,+5" [join [list \
+gdb_test "record instruction-history /f 3,+5" [multi_line \
   "3\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "4\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tdec    %eax" \
   "5\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "6\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
   "7\t   0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
-  ] "\r\n"]
+  ]
 
-gdb_test "record instruction-history /p 7,-5" [join [list \
+gdb_test "record instruction-history /p 7,-5" [multi_line \
   "3\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "4\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tdec    %eax" \
   "5\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "6\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
   "7\t0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
-  ] "\r\n"]
+  ]
 
-gdb_test "record instruction-history /pf 3,7" [join [list \
+gdb_test "record instruction-history /pf 3,7" [multi_line \
   "3\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "4\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tdec    %eax" \
   "5\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tjmp    0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
   "6\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tcmp    \\\$0x0,%eax" \
   "7\t0x\[0-9a-f\]+ <\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
-  ] "\r\n"]
+  ]
 
 gdb_test "record instruction-history 3,3" "3\t   0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje     0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r"
 
This page took 0.026696 seconds and 4 git commands to generate.