public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Debug Methods in GDB Python
Date: Thu, 09 Jan 2014 19:01:00 -0000	[thread overview]
Message-ID: <CADPb22QeWx-HPEXRaDkwek=HSp-HVUBKxMj-HAJ-4qzK5RN6hA@mail.gmail.com> (raw)
In-Reply-To: <CAGyQ6gyrrLSMaYaxWriMUTYFfKZ9VAP95jL=ShP_3Fag=REPtg@mail.gmail.com>

On Tue, Jan 7, 2014 at 4:48 PM, Siva Chandra <sivachandra@google.com> wrote:
> 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.

For the most part, correct.
Though I haven't seen a compelling argument to be different than how
pretty-printers do things.

> 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?

But if this single object isn't constructed at lookup time this would
be modifying, essentially, global state.
[Maybe I'm misunderstanding.]

      reply	other threads:[~2014-01-09 19:01 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
2014-01-09 19:01                   ` Doug Evans [this message]

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='CADPb22QeWx-HPEXRaDkwek=HSp-HVUBKxMj-HAJ-4qzK5RN6hA@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).