* testcase help
@ 2004-08-04 20:45 Manoj Iyer
2004-08-04 22:44 ` Michael Chastain
0 siblings, 1 reply; 5+ messages in thread
From: Manoj Iyer @ 2004-08-04 20:45 UTC (permalink / raw)
To: gdb
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 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: testcase help
2004-08-04 20:45 testcase help Manoj Iyer
@ 2004-08-04 22:44 ` Michael Chastain
2004-08-05 15:35 ` Manoj Iyer
0 siblings, 1 reply; 5+ messages in thread
From: Michael Chastain @ 2004-08-04 22:44 UTC (permalink / raw)
To: manjo, gdb
I don't even use gdb_continue ... how about just plain:
gdb_test_multiple "continue" "continue to foo ..." {
...
}
Or maybe I'm not getting the problem.
Michael C
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: testcase help
2004-08-04 22:44 ` Michael Chastain
@ 2004-08-05 15:35 ` Manoj Iyer
2004-08-05 23:26 ` thread testcase compile issue (question) Manoj Iyer
0 siblings, 1 reply; 5+ messages in thread
From: Manoj Iyer @ 2004-08-05 15:35 UTC (permalink / raw)
To: Michael Chastain; +Cc: gdb
Michael,
I tried ur suggestion but it still did not work, so I used send_gdb and
gdb_expect{} and got it to work. Thanks for the help.
Thanks
----- ----
Manoj Iyer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On Wed, 4 Aug 2004, Michael Chastain wrote:
> I don't even use gdb_continue ... how about just plain:
>
> gdb_test_multiple "continue" "continue to foo ..." {
> ...
> }
>
> Or maybe I'm not getting the problem.
>
> Michael C
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* thread testcase compile issue (question)
2004-08-05 15:35 ` Manoj Iyer
@ 2004-08-05 23:26 ` Manoj Iyer
2004-08-06 6:09 ` Michael Chastain
0 siblings, 1 reply; 5+ messages in thread
From: Manoj Iyer @ 2004-08-05 23:26 UTC (permalink / raw)
To: Michael Chastain; +Cc: gdb
When I execute tests under gdb.threads/ directory for instance killed.exp,
I see 2 complies of the same testcase, the first one gets a linker error
/usr/bin/ld: cannot find -lpthreads but the second time it works with no
errors. Anyone has any idea why???
Here is the output on x86 for you to compare:
=== gdb tests ===
Schedule of variations:
unix
Running target unix
Using /home/manjo/projects/gdb/june/src/dejagnu/baseboards/unix.exp as
board des
cription file for target.
Using /home/manjo/projects/gdb/june/src/dejagnu/config/unix.exp as generic
inter
face file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.threads/killed.exp ...
Executing on host: gcc ./gdb.threads/killed.c
-I/home/manjo/projects/gdb/june/s
rc/gdb/testsuite -g -lpthreads -lm -o
/home/manjo/projects/gdb/june/src/gdb/t
estsuite/gdb.threads/killed (timeout = 300)
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
Executing on host: gcc ./gdb.threads/killed.c
-I/home/manjo/projects/gdb/june/s
rc/gdb/testsuite -g -lpthread -lm -o
/home/manjo/projects/gdb/june/src/gdb/te
stsuite/gdb.threads/killed (timeout = 300)
PASS: gdb.threads/killed.exp: successfully compiled posix threads test
case
GNU gdb 2004-06-30-cvs
Thanks
----- ----
Manoj Iyer
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On Thu, 5 Aug 2004, Manoj Iyer wrote:
>
> Michael,
>
> I tried ur suggestion but it still did not work, so I used send_gdb and
> gdb_expect{} and got it to work. Thanks for the help.
>
> Thanks
> ----- ----
> Manoj Iyer
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + Cognito ergo sum +
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> On Wed, 4 Aug 2004, Michael Chastain wrote:
>
> > I don't even use gdb_continue ... how about just plain:
> >
> > gdb_test_multiple "continue" "continue to foo ..." {
> > ...
> > }
> >
> > Or maybe I'm not getting the problem.
> >
> > Michael C
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: thread testcase compile issue (question)
2004-08-05 23:26 ` thread testcase compile issue (question) Manoj Iyer
@ 2004-08-06 6:09 ` Michael Chastain
0 siblings, 0 replies; 5+ messages in thread
From: Michael Chastain @ 2004-08-06 6:09 UTC (permalink / raw)
To: manjo; +Cc: gdb
Manoj Iyer <manjo@austin.ibm.com> wrote:
> When I execute tests under gdb.threads/ directory for instance killed.exp,
> I see 2 complies of the same testcase, the first one gets a linker error
> /usr/bin/ld: cannot find -lpthreads but the second time it works with no
> errors. Anyone has any idea why???
This is normal.
Different systems keep the thread library in different places.
So the test suite tries three different "-l" options until it finds
one that works.
The specific code is in: testsuite/lib/gdb.exp, proc gdb_compile_pthreads.
Michael C
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-06 6:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04 20:45 testcase help Manoj Iyer
2004-08-04 22:44 ` Michael Chastain
2004-08-05 15:35 ` Manoj Iyer
2004-08-05 23:26 ` thread testcase compile issue (question) Manoj Iyer
2004-08-06 6:09 ` Michael Chastain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).