This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix cleanup in finish_command
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Pedro Alves (palves at redhat dot com)" <palves at redhat dot com>
- Date: Fri, 21 Jun 2013 13:43:13 +0200
- Subject: Re: [patch] Fix cleanup in finish_command
- References: <20130619211444 dot GA29379 at host2 dot jankratochvil dot net> <20130620143118 dot GA11929 at host2 dot jankratochvil dot net> <20130620151806 dot GD4724 at adacore dot com> <A78C989F6D9628469189715575E55B230A96FABA at IRSMSX104 dot ger dot corp dot intel dot com> <20130620161945 dot GA16142 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B230A96FF66 at IRSMSX104 dot ger dot corp dot intel dot com>
On Fri, 21 Jun 2013 10:03:21 +0200, Metzger, Markus T wrote:
> > Unrelated:
> > There is testcase FAILing randomly, reproducible with "read1.so" from:
> > http://sourceware.org/bugzilla/show_bug.cgi?id=12649
> > Running ./gdb.btrace/exception.exp ...
> > FAIL: gdb.btrace/exception.exp: exception - flat (timeout)
>
> I do not think that this is an actual issue. It runs into a timeout because
> there is so much memory to read.
>
> When I add to my board file:
>
> set_board_info gdb,timeout 8000
>
> it takes a very long time, but the test eventually passes.
BTW the testcase is still not right, sometimes it fails due to:
ERROR: internal buffer is full.
ERROR: internal buffer is full.
(This is why I tried the "read1" reproducer for it...)
One can either increase the expect buffer size or rather use appropriate
lib/gdb.exp function for it.
To be just merged into the patchset I think.
Regards,
Jan
diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp
index a8da2b0..430c84b 100644
--- a/gdb/testsuite/gdb.btrace/exception.exp
+++ b/gdb/testsuite/gdb.btrace/exception.exp
@@ -44,24 +44,28 @@ gdb_test_no_output "record btrace"
gdb_continue_to_breakpoint "cont to $bp_2" ".*$srcfile:$bp_2.*"
# show the flat branch trace
-gdb_test "record function-call-history 1" "
+send_gdb "record function-call-history 1\n"
+gdb_expect_list "exception - flat" "\r\n$gdb_prompt $" { "\r
1\tmain\\(\\)\r
2\ttest\\(\\)\r
3\tfoo\\(\\)\r
4\tbar\\(\\)\r
5\tbad\\(\\)\r
-.*\r
-\[0-9\]*\ttest\\(\\)" "exception - flat"
+"
+ "\r\n\[0-9\]*\ttest\\(\\)"
+}
# show the branch trace with calls indented
#
# here we see a known bug that the indentation starts at level 1 with
# two leading spaces instead of level 0 without leading spaces.
-gdb_test "record function-call-history /c 1" "
+send_gdb "record function-call-history /c 1\n"
+gdb_expect_list "exception - calls indented" "\r\n$gdb_prompt $" { "\r
1\tmain\\(\\)\r
2\t test\\(\\)\r
3\t foo\\(\\)\r
4\t bar\\(\\)\r
5\t bad\\(\\)\r
-.*\r
-\[0-9\]*\t test\\(\\)" "exception - calls indented"
+"
+ "\r\n\[0-9\]*\t test\\(\\)"
+}