From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Keith Seitz <keiths@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix MI dprintf-insert not printing when a location is pending.
Date: Fri, 27 Mar 2015 17:13:00 -0000 [thread overview]
Message-ID: <55158F97.7030400@ericsson.com> (raw)
In-Reply-To: <55158AAF.7010709@redhat.com>
On 03/27/2015 12:51 PM, Keith Seitz wrote:
> On 03/27/2015 05:36 AM, Antoine Tremblay wrote:
>> diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
>> b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
>> new file mode 100644
>> index 0000000..6185329
>> --- /dev/null
>> +++ b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
> ...
>
>> +set msg "mi dprintf"
>> +gdb_expect {
>> + -re ".*~\"hello\"" {
>> + pass $msg
>> + }
>> + -re ".*$mi_gdb_prompt$" {
>> + fail $msg
>> + }
>> + timeout {
>> + fail $msg
>> + }
>> +}
>
> Pending a previous query about using mi_gdb_test here, I recommend a
> maintainer approve this patch.
>
Indeed I had missed that you can call it without a command, my mind must
have skipped that line, thanks :)
However there is still a problem forcing me to use gdb_expect I think,
namely mi_gdb_test waits for a command prompt like so :
-re "^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)"
However dprintf does mean you will get a prompt printed...
You will get a prompt only when hitting the breakpoint I placed.
This means that if for some reason the breakpoint would not hit, the
dprintf test would fail, when it's the breakpoint that should fail.
I could remove mi_expect_stop at the end and assume that breakpoint will
not fail but I think it's not right ? also mi-dprintf.exp is using the
same mi_run_cmd / gdb_expect / mi_expect_stop ...
What do you think ?
next prev parent reply other threads:[~2015-03-27 17:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 16:47 Antoine Tremblay
2015-03-26 19:11 ` Keith Seitz
2015-03-27 12:34 ` Antoine Tremblay
2015-03-27 12:37 ` Antoine Tremblay
2015-03-27 16:52 ` Keith Seitz
2015-03-27 17:13 ` Antoine Tremblay [this message]
2015-03-27 17:34 ` Keith Seitz
2015-04-20 12:14 ` Antoine Tremblay
2015-06-12 12:27 ` [PATCH v3] Fix MI dprintf-insert not printing on a resolved pending location Antoine Tremblay
2015-06-12 12:33 ` Pedro Alves
2015-03-27 16:46 ` [PATCH] Fix MI dprintf-insert not printing when a location is pending Keith Seitz
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=55158F97.7030400@ericsson.com \
--to=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.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