From: Phil Muldoon <pmuldoon@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] [python] Expose some breakpoint operations to Python
Date: Thu, 23 Jun 2011 18:58:00 -0000 [thread overview]
Message-ID: <m3r56ke5od.fsf@redhat.com> (raw)
In-Reply-To: <201106231804.26462.pedro@codesourcery.com> (Pedro Alves's message of "Thu, 23 Jun 2011 18:04:26 +0100")
Pedro Alves <pedro@codesourcery.com> writes:
> On Thursday 23 June 2011 16:56:50, Phil Muldoon wrote:
>> Yes the multiple locations thing is a bit weird. But from (my Python)
>> point of view, that is an internal abstraction that the Python glue code
>> will absorb. I don't think this will affect Python API users too much.
>
> What happens if you create a python breakpoint that ends up
> with multiple locations? Don't you end up tripping on this
> assertion?
>
> /* 5 and 6 */
> if (b->ops != NULL && b->ops->print_one != NULL)
> {
> /* Although the print_one can possibly print all locations,
> calling it here is not likely to get any nice result. So,
> make sure there's just one location. */
> gdb_assert (b->loc == NULL || b->loc->next == NULL);
> b->ops->print_one (b, last_loc);
> }
Well to be fair, any breakpoint that implements breakpoint_ops will
(including catchpoints). I guess the point there is that they won't, or
are not likely to encounter this. Fair point. Actually I should have
tested for this very scenario, so I will add it to the Python
tests. What we could do is if a breakpoint has multiple locations just
don't call this routine, or alter the logic to raise something less
aggressive than an assert. But you have convinced me that breakpoint
ops need a good going over. Any function, internal or external, that
lets the user create a perfectly legitimate breakpoint, then later
causes GDB to give up, because it does not how to handle it is bogus.
>> But I take your point. I'm trying to position this patch so that users
>> can access a limited subset of printing breakpoint operations. The
>> time-line is important here too. If this refactoring internally is just
>> going to take a few weeks, hey, no big deal, I can just wait and
>> adjust. But if it is a long term thing, I think we could expose the
>> limited functionality we expose now.
>
> I'd like to finish that conversion soon.
I really look forward to it! In the meantime I will check-in the patch
to a git branch on archer, and keep it updated. If the breakpoint ops
refactoring turns into a deep-dark hole, we can always later do something
like the above in solving it.
Cheers,
Phil
next prev parent reply other threads:[~2011-06-23 18:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 12:35 Phil Muldoon
2011-06-23 13:19 ` Eli Zaretskii
2011-06-23 14:07 ` Pedro Alves
2011-06-23 14:46 ` Phil Muldoon
2011-06-23 15:30 ` Pedro Alves
2011-06-23 15:57 ` Phil Muldoon
2011-06-23 17:04 ` Pedro Alves
2011-06-23 18:58 ` Phil Muldoon [this message]
2011-06-24 16:42 ` more OO, use breakpoints_ops for all kinds of breakpoints (Re: [patch] [python] Expose some breakpoint operations to Python) Pedro Alves
2011-06-27 8:52 ` Phil Muldoon
2011-07-22 15:06 ` Phil Muldoon
2011-07-22 15:20 ` Pedro Alves
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=m3r56ke5od.fsf@redhat.com \
--to=pmuldoon@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@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