Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Doug Evans <dje@google.com>
Cc: Alessandro Di Federico <ale+gdb@clearmind.me>,
	gdb-patches@sourceware.org
Subject: Re: [PING^3] [PATCH] Expose signal and syscall catchpoints to Python
Date: Sat, 19 Dec 2015 03:56:00 -0000	[thread overview]
Message-ID: <20151219035647.GH29928@adacore.com> (raw)
In-Reply-To: <001a1136affa52fa4b052730e695@google.com>

> This will need doc additions too of course, but before you
> spend time on that there is a high level issue that we
> (the community) should decide on:
> Is it time to start subclassing breakpoints instead of
> continually extending the one uber-breakpoint class?
> IOW, should catchpoints be a subclass of breakpoints?
> 
> Subclassing is clearly a better way to go,
> so I'm kinda thinking now's the time.

Thinking out loud...

I like the idea of starting subclassing. And this is potentially
a direction we could be going too in the long term with the core
part of GDB after the move to C++ for instance (not sure it makes
sense, just thinking aloud). Doing it with the C++ interface could
also be good prep for thinking about what would work and what would
not.

The question then becomes backward compatibility. I think it can
fairly easily be preserved, by keeping the Breakpoint class as is,
with both breakpoint and whatever catchpoint support it already
has as is, and only adding the new capabilities in a the new
child class? FTAOD, the child class would have all features of
catchpoints through the Breakpoint class, combined with whatever
new feature we implement over time. This would give people some time
to transition from the current approach to the new one, before
we decide to remove the catchpoint stuff from the Breakpoint
class.

At some point, we might find that we want class Breakpoint
to be a child of some RootBreakpoint or AbstractBreakpoint
class. That should be easy to do.

The part that might not be so easy is getting rid of the "type"
argument in Breakpoint.__init__'s method...

-- 
Joel


  reply	other threads:[~2015-12-19  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 19:11 Doug Evans
2015-12-19  3:56 ` Joel Brobecker [this message]
2015-12-19 18:17   ` Paul_Koning
  -- strict thread matches above, loose matches on Subject: below --
2015-12-16 22:24 Alessandro Di Federico

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=20151219035647.GH29928@adacore.com \
    --to=brobecker@adacore.com \
    --cc=ale+gdb@clearmind.me \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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