"3\tfoo\\(\\)" \
"4\tbar\\(\\)" \
"5\tbad\\(\\)\r" \
- ] \
- "" \
- "\[0-9\]*\ttest\\(\\)"]
+ ] "" \
+ [multi_line \
+ "\[0-9\]*\ttest\\(\\)" \
+ "\[0-9\]*\tmain\\(\\)" \
+ ] "" \
+ ]
# show the branch trace with calls indented
send_gdb "record function-call-history /c 1\n"
gdb_expect_list "indented" "\r\n$gdb_prompt $" [list \
[multi_line \
"1\tmain\\(\\)" \
- "2\t test\\(\\)" \
- "3\t foo\\(\\)" \
- "4\t bar\\(\\)" \
- "5\t bad\\(\\)\r" \
- ] \
- "" \
- "\[0-9\]*\t test\\(\\)"]
+ "2\t test\\(\\)" \
+ "3\t foo\\(\\)" \
+ "4\t bar\\(\\)" \
+ "5\t bad\\(\\)\r" \
+ ] "" \
+ [multi_line \
+ "\[0-9\]*\t test\\(\\)" \
+ "\[0-9\]*\tmain\\(\\)" \
+ ] "" \
+ ]
# moving forward again, but this time with file and line number, expected to see the first 15 entries
gdb_test "record function-call-history /l +" [multi_line \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
] "forward /l - 1"
# moving forward and expect to see the latest 6 entries
gdb_test "record function-call-history /l +" [multi_line \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,41" \
- "\[0-9\]*\tinc\tat $srcfile:22,24" \
+ "\[0-9\]*\tinc\tat $srcfile:22,2\[34\]" \
"\[0-9\]*\tmain\tat $srcfile:40,43" \
] "forward /l - 2"