From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org, pmuldoon@redhat.com
Subject: Re: [patch] [python] Expose some breakpoint operations to Python
Date: Thu, 23 Jun 2011 17:04:00 -0000 [thread overview]
Message-ID: <201106231804.26462.pedro@codesourcery.com> (raw)
In-Reply-To: <m3boxoh77h.fsf@redhat.com>
On Thursday 23 June 2011 16:56:50, Phil Muldoon wrote:
> Pedro Alves <pedro@codesourcery.com> writes:
>
> > On Thursday 23 June 2011 15:46:14, Phil Muldoon wrote:
>
> > No plan yet. I just started out by adding a single breakpoint_ops instance
> > that handles all breakpoint types that currently aren't using breakpoint_ops,
> > and moving all default actions to the corresponding callback. This would
> > be straightforward if the API is a good fit. But take a look at
> > the fallback code in print_one_breakpoint_location, and print_one_breakpoint.
> > Breakpoints with multiple locations are handled a bit differently than
> > just a fallbach, with multiple calls to print_one_breakpoint. Maybe
> > we could move all that !print_one code inside the new print_one
> > callback?
>
> 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);
}
> 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.
--
Pedro Alves
next prev parent reply other threads:[~2011-06-23 17:04 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 [this message]
2011-06-23 18:58 ` Phil Muldoon
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=201106231804.26462.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@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