This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR 15692 -dprintf-insert does not accept double quotes
- From: Hui Zhu <teawater at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Thu, 18 Jul 2013 20:57:27 +0800
- Subject: Re: [PATCH] Fix PR 15692 -dprintf-insert does not accept double quotes
- References: <CANFwon1gnBtdU2jbrZ9bCVuF3dMPAY2syeB1oMBXE1x4PSDLNA at mail dot gmail dot com> <51D2E749 dot 9020604 at codesourcery dot com> <CANFwon34nGekzdhGMA4=-0_1n_5CQ2jnxeq8bo8SjLU5e4wP-g at mail dot gmail dot com> <51D4030F dot 6070000 at codesourcery dot com> <CANFwon23=5E8DH4KHK0jMU+ZP33DtEzZNFQpYOQDzUq+oo80QQ at mail dot gmail dot com> <51D42272 dot 20209 at codesourcery dot com> <CANFwon0GvGudzY2=LuROho=kSWY7bjv0dPE=GxZWjmhOrtC1xQ at mail dot gmail dot com> <87r4f6gxfn dot fsf at fleche dot redhat dot 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