public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Siva Chandra <sivachandra@google.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Debug Methods in GDB Python
Date: Wed, 08 Jan 2014 00:49:00 -0000	[thread overview]
Message-ID: <CAGyQ6gyrrLSMaYaxWriMUTYFfKZ9VAP95jL=ShP_3Fag=REPtg@mail.gmail.com> (raw)
In-Reply-To: <CADPb22SWdHHC7XUFrnu+sSbe8TTGuMqsZKt81yaN_kA2Xa_ysg@mail.gmail.com>

I am assuming you have not prescribed anything here, but are only
presenting pros of doing things in a certain way.  I am also assuming
that you are waiting for others to chime in with their views.

On Fri, Jan 3, 2014 at 10:52 AM, Doug Evans <dje@google.com> wrote:
> I like having the object gdb calls to do the lookup return another
> object that gdb calls to implement the functionality.
>
> 1) It supports more flexibility in how the user can organize things
> (e.g., one "lookup" object can handle different "worker" objects).

For doing such things, I had a design like this in mind: We setup up a
hierarchy of DebugMethod classes. The base class only does type and
method matching. The derived concrete classes extend the base class by
adding arg matching and the method invocation. This way, 'lookup' and
'worker' functionalities are separated code wise but still
encapsulated in a single DebugMethod object.

> 2) The worker object can obtain state at runtime (it is constructed at
> lookup time).

This can be done on a single object by providing a setter?

  reply	other threads:[~2014-01-08  0:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 22:41 Siva Chandra
2013-11-26  3:22 ` Siva Chandra
2013-12-06  6:31   ` Doug Evans
2013-12-06 23:24     ` Siva Chandra
2013-12-12  5:26       ` Doug Evans
2013-12-13 19:25         ` Siva Chandra
2013-12-16 17:56           ` Doug Evans
2013-12-16 22:43             ` Siva Chandra
2014-01-01 12:23             ` Siva Chandra
2014-01-03 18:52               ` Doug Evans
2014-01-08  0:49                 ` Siva Chandra [this message]
2014-01-09 19:01                   ` Doug Evans

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='CAGyQ6gyrrLSMaYaxWriMUTYFfKZ9VAP95jL=ShP_3Fag=REPtg@mail.gmail.com' \
    --to=sivachandra@google.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).