From: Pedro Alves <palves@redhat.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix for PR gdb/17017
Date: Wed, 04 Jun 2014 20:05:00 -0000 [thread overview]
Message-ID: <538F7BF5.4010608@redhat.com> (raw)
In-Reply-To: <CAGyQ6gzKv7KzJsvndX1OGY4_0yPw5ewB=O3F49LdEHkp-N-O7w@mail.gmail.com>
On 06/04/2014 08:57 PM, Siva Chandra wrote:
> The attached patch should fix PR 17017.
>
> ChangeLog
>
> 2014-06-04 Siva Chandra Reddy <sivachandra@google.com>
>
> testsuite/
>
> PR gdb/17017
> * gdb.python/py-xmethods.exp (gdb_test_if_inferiorio): New function.
> Update few gdb_test invocations to gdb_test_if_inferiorio.
Ah, I hadn't realized the test was relying on IO. It's unfortunate,
as that way the coverage isn't complete when testing against gdbserver.
Can we make it not rely on IO instead? You want to be
sure the C++ methods were called, right?
E.g., one idea would be, instead of:
int
B::geta (void)
{
cout << "From CC B::geta:" << endl;
return 2 * a;
}
Do:
int B_geta_called;
int
B::geta (void)
{
B_geta_called++;
return 2 * a;
}
And then from GDB, read the B_geta_called variable
to tell whether the method was called. You can e.g.,
use get_integer_valueof for that.
--
Pedro Alves
prev parent reply other threads:[~2014-06-04 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 19:57 Siva Chandra
2014-06-04 20:05 ` Pedro Alves [this message]
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=538F7BF5.4010608@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sivachandra@google.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