Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Yao Qi <yao@codesourcery.com>,
	gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix PR 15692 -dprintf-insert does not accept double quotes
Date: Thu, 18 Jul 2013 12:58:00 -0000	[thread overview]
Message-ID: <CANFwon2EcxGLbhuiBpcQuvsqMFOsQSO85CB0ZAtn42VpdLWzKw@mail.gmail.com> (raw)
In-Reply-To: <87r4f6gxfn.fsf@fleche.redhat.com>

On Thu, Jul 11, 2013 at 1:02 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> +  if { $args == "call" || $args == "fprintf" } {
> Hui> +      set foobarbazqux "\"foobarbazqux\""
> Hui> +  } else {
> Hui> +      set foobarbazqux "\\\\\"foobarbazqux\\\\\""
> Hui> +  }
>
> Why are different regexps needed for these cases?
> I thought the output was supposed to be the same in all situations.

With "call" or "fprintf".
The dprintf is directly outputted by inferior.  So the string is:
"foobarbazqux" At foo entry

But with others, the dprintf is outputted by GDB.  So the string is:
~"\"foobarbazqux\" At foo entry\n"

That is why I use different $foobarbazqux.

Thanks,
Hui

>
> Other than this issue the patch is ok.
>
> Tom


  reply	other threads:[~2013-07-18 12:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 13:31 Hui Zhu
2013-07-02 14:44 ` Yao Qi
2013-07-03  8:42   ` Hui Zhu
2013-07-03 10:55     ` Yao Qi
2013-07-03 12:03       ` Hui Zhu
2013-07-03 13:09         ` Yao Qi
2013-07-07  5:54           ` Hui Zhu
2013-07-10 17:03             ` Tom Tromey
2013-07-18 12:58               ` Hui Zhu [this message]
2013-07-18 13:42                 ` Tom Tromey
2013-07-19  7:29                   ` Hui Zhu
2013-07-23 19:04                     ` Tom Tromey
2013-07-24  1:56                       ` Hui Zhu

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=CANFwon2EcxGLbhuiBpcQuvsqMFOsQSO85CB0ZAtn42VpdLWzKw@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    --cc=yao@codesourcery.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