From: Michael Snyder <msnyder@redhat.com>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: New thread testcase (resubmit)
Date: Fri, 27 Aug 2004 17:55:00 -0000 [thread overview]
Message-ID: <412F7572.2070704@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0408271002390.30583@lazy>
Manoj Iyer wrote:
> I have attached two modified versions of my new thread testcase.
>
> - version 1
> incorporates Michael Chastain's suggestions and it includes
> the step and backtrace tests from the thread fucntion.
>
> -version 2
> incorporates Michael Snyder suggestion to remove the step and backtrace
> tests from the testcase.
>
> Please let me know which one you like and any other comments or changes.
> ChangeLog is pasted at the begning of the patch.
Version 2 is OK as is, if you're tired of messing with it.
You didn't have to remove the backtrace, though, if you'd
like to keep that.
Also,
> +#
> +#
> +# continue to tf() breakpoint #2
> +#
> +gdb_test_multiple "continue\n" "continue to thread fucntion breakpoint #2" {
> + -re ".*Breakpoint 2.*tf.* at .*tbug.* .*\r\n.*$gdb_prompt $" {
> + pass "continue to tf";
> + }
> + -re ".*$gdb_prompt $" {
> + fail "continue to tf";
> + return 1;
> + }
> +}
I think this could be simplified to:
gdb_test "continue" \
"Breakpoint 2.*tf.* at .*tbug.*" \
"continue to tf"
Similarly, your backtrace test could be as simple as:
gdb_test "backtrace" \
"#0 .*tf .*at .*tbug.*" \
"backtrace from thread function"
I don't think you can predict what will be on any
higher frames, but you could test the current frame
and make sure backtrace didn't just die or show you
the wrong thread.
> +
> +
> +#
> +# delete all breakpoints
> +#
> +send_gdb "delete\n"
> +gdb_expect {
> + -re "Delete all breakpoint.*$gdb_prompt $" {
> + send_gdb "y\n"
For this, all you need is the existing procedure call:
delete_breakpoints
next prev parent reply other threads:[~2004-08-27 17:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-27 16:32 Manoj Iyer
2004-08-27 17:55 ` Michael Snyder [this message]
2004-08-27 18:51 ` Manoj Iyer
2004-08-27 19:45 ` Michael Snyder
2004-08-27 19:54 ` Manoj Iyer
2004-08-30 23:20 ` Manoj Iyer
2004-08-31 21:41 ` New thread testcase (ok to commit??) Manoj Iyer
2004-08-31 20:02 ` [COMMIT] New thread testcase Manoj Iyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=412F7572.2070704@redhat.com \
--to=msnyder@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=manjo@austin.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox