From: Keith Seitz <keiths@redhat.com>
To: Hui Zhu <hui_zhu@mentor.com>
Cc: Yao Qi <yao@codesourcery.com>,
gdb-patches ml <gdb-patches@sourceware.org>,
Marc Khouzam <marc.khouzam@ericsson.com>
Subject: Re: [PATCH] Fix dprintf work not right if it is pending
Date: Mon, 25 Mar 2013 01:00:00 -0000 [thread overview]
Message-ID: <514EEBFF.8090705@redhat.com> (raw)
In-Reply-To: <514C3C85.4000704@codesourcery.com>
On 03/22/2013 04:12 AM, Yao Qi wrote:
>> But if the dprintf is pending. When it reset by function bkpt_re_set,
>> there is not code to code to update extra_string to commands.
>> So I add this code to function update_breakpoint_locations. The issue
>> is fixed.
>
> The bug was reported in PR breakpoints/15292: Pending dprintf don't
> work.
>
> We need a test case here, I think, to show pending dprintf doesn't
> work, and it works with your patch applied.
>
> I am wondering whether we need a new breakpoint_ops field
> "parse_extra_string", and use it like:
>
> b->ops->parse_extra_string (b, extra_string);
>
> instead of duplicate the code.
I agree: special handling is necessary, but I don't care for either of
these solutions. The original proposal clutters generic breakpoint code
with dprintf-specific handling. As Yao correctly points out, this is
what the breakpoint ops vector is for.
However, I don't like the idea of adding a new "parse_extra_string"
method. It is far too vague. Parse extra_string when?
I think the better solution, and one which we already have the
infrastructure for, is to define a dprintf_re_set method in the
dprintf's breakpoint ops, updating the command list whenever a pending
breakpoint is resolved.
This definitely needs a test.
Keith
next prev parent reply other threads:[~2013-03-24 12:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 7:39 Hui Zhu
2013-03-22 12:40 ` Yao Qi
2013-03-25 1:00 ` Keith Seitz [this message]
2013-03-25 2:14 ` Yao Qi
2013-03-26 14:55 ` Hui Zhu
2013-03-28 17:07 ` Keith Seitz
2013-03-29 15:50 ` Hui Zhu
2013-04-03 3:34 ` Keith Seitz
2013-04-04 18:42 ` Hui Zhu
2013-04-05 18:30 ` Pedro Alves
2013-04-08 7:20 ` Keith Seitz
2013-04-08 17:57 ` Pedro Alves
2013-04-08 9:34 ` Hui Zhu
2013-04-08 14:35 ` Hui Zhu
2013-04-08 18:34 ` Pedro Alves
2013-04-09 15:28 ` Hui Zhu
2013-04-09 15:28 ` Pedro Alves
2013-04-10 15:57 ` Hui Zhu
2013-04-10 16:12 ` Hui Zhu
2013-04-11 5:46 ` Joel Brobecker
2013-04-11 17:03 ` Pedro Alves
2013-04-12 12:21 ` Hui Zhu
2013-03-25 8:25 ` Hui Zhu
2013-03-25 8:28 ` Yao Qi
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=514EEBFF.8090705@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=hui_zhu@mentor.com \
--cc=marc.khouzam@ericsson.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