This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
testcase help
- From: Manoj Iyer <manjo at austin dot ibm dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 4 Aug 2004 15:15:06 -0500 (CDT)
- Subject: testcase help
I am writing a testcase for gdb in which I want to make GDB continue to
the next breakpoint, so I used gdb_continue "FUNC" to get to the
next breakpoint.
Here is the problem that I have ...
============ testcase code ================
gdb_continue "tf"
gdb_expect {
-re "Breakpoint .* at .*\r\n$gdb_prompt $" {
pass "continue to tf";
}
-re ".*$gdb_prompt $" {
fail "continue to tf";
gdb_suppress_tests;
}
timeout {
fail "continue to tf (timeout)";
gdb_suppress_tests;
}
}
=========== Out put ==============
continue
30 for (n = 0; n < N; ++n)
(gdb) FAIL: gdb.threads/thread_break.exp: continue to tf
continue
Continuing.
[New Thread 32769 (LWP 29005)]
[New Thread 16386 (LWP 29006)]
[Switching to Thread 16386 (LWP 29006)]
Breakpoint 2, tf (arg=0x0) at gdb.threads/tbug.c:14
14 int n = (int) (long int) arg;
(gdb) PASS: gdb.threads/thread_break.exp: continue to tf
but a gdb_expect with correct parameters catches this continue as success.
I cannot get it to continue correctly with send_gdb "continue" that is why
I used gdb_continue.
What am I doing wrong?
Thanks
----- ----
Manoj Iyer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++