From: Doug Evans <dje@google.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: Pedro Alves <palves@redhat.com>, <eliz@gnu.org>,
<gdb-patches@sourceware.org>
Subject: Re: [PATCH, doc RFA] Add "skip regexp"
Date: Thu, 03 Mar 2016 19:21:00 -0000 [thread overview]
Message-ID: <047d7b15faa92d0dac052d29e927@google.com> (raw)
Doug Evans writes:
> Simon Marchi writes:
> > On 16-02-16 08:07 PM, Doug Evans wrote:
> > > +# Test -fi + -fu.
> > > +
> > > +if ![runto_main] {
> > > + fail "Can't run to main"
> > > + return
> > > +}
> > > +
> > > +set test "step using -fi + -fu"
> > > +gdb_test_no_output "skip delete"
> > > +gdb_test "skip -fi skip1.c -fu test_skip" \
> > > + "Function test_skip in file skip1.c will be skipped when
> stepping\."
> > > +gdb_breakpoint "test_skip_file_and_function"
> > > +gdb_breakpoint "end_test_skip_file_and_function"
> > > +gdb_test "call test_skip_file_and_function ()" "silently stop."
> >
> > Hi Doug,
> >
> > I just saw a failure of this test on a target that doesn't have
inferior
> calls. It
> > seems to me like the function call isn't fundamental to the test and
it
> could be
> > avoided by organizing things differently. What do you think?
> >
> > Otherwise, we would need to add a
> >
> > if [target_info exists gdb,cannot_call_functions] {
>
> Bleah, righto.
>
> Fix forthcoming.
> I need to cleanup skip.exp first.
2016-03-03 Doug Evans <dje@google.com>
* gdb.base/skip.c (main): Call test_skip_file_and_function.
* gdb.base/skip.exp: Remove hand calling test_skip_file_and_function.
diff --git a/gdb/testsuite/gdb.base/skip.c b/gdb/testsuite/gdb.base/skip.c
index b9db2a7..e43da1e 100644
--- a/gdb/testsuite/gdb.base/skip.c
+++ b/gdb/testsuite/gdb.base/skip.c
@@ -25,8 +25,14 @@ void skip1_test_skip_file_and_function (void);
int
main ()
{
+ int x;
+
/* Use comma operator to sequence evaluation of bar and foo. */
- return baz ((bar (), foo ()));
+ x = baz ((bar (), foo ()));
+
+ test_skip_file_and_function ();
+
+ return 0;
}
int
diff --git a/gdb/testsuite/gdb.base/skip.exp
b/gdb/testsuite/gdb.base/skip.exp
index 67ae9d9..ce55dd2 100644
--- a/gdb/testsuite/gdb.base/skip.exp
+++ b/gdb/testsuite/gdb.base/skip.exp
@@ -281,17 +281,15 @@ with_test_prefix "step using -rfu for baz" {
# Test -fi + -fu.
with_test_prefix "step using -fi + -fu" {
- if ![runto_main] {
- fail "Can't run to main"
+ gdb_test_no_output "skip delete"
+
+ if ![runto test_skip_file_and_function no-message] {
+ fail "Can't run to test_skip_file_and_function"
return
}
- gdb_test_no_output "skip delete"
gdb_test "skip -fi skip1.c -fu test_skip" \
"Function test_skip in file skip1.c will be skipped when stepping\."
- gdb_breakpoint "test_skip_file_and_function"
- gdb_breakpoint "end_test_skip_file_and_function"
- gdb_test "call test_skip_file_and_function ()" "silently stop."
# Verify we can step into skip.c:test_skip but not skip1.c:test_skip.
gdb_test "step" "test_skip \\(\\) at.*" "step 1"
gdb_test "step" "test_skip_file_and_function \\(\\) at.*" "step 2"; #
Return from test_skip()
next reply other threads:[~2016-03-03 19:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 19:21 Doug Evans [this message]
2016-03-03 20:40 ` Simon Marchi
-- strict thread matches above, loose matches on Subject: below --
2016-03-15 19:45 Doug Evans
2016-03-02 23:20 Doug Evans
2016-02-23 21:36 Doug Evans
2016-02-24 9:54 ` Joel Brobecker
2016-02-24 18:21 ` Doug Evans
2016-02-17 1:07 Doug Evans
2016-02-17 16:07 ` Eli Zaretskii
2016-02-29 18:55 ` Simon Marchi
2016-02-02 18:05 Doug Evans
2016-02-02 1:03 Doug Evans
2016-02-02 16:10 ` Eli Zaretskii
2016-02-04 13:47 ` Pedro Alves
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=047d7b15faa92d0dac052d29e927@google.com \
--to=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@ericsson.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