This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]