public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] add more methods to gdb.Progspace
Date: Tue, 17 Jun 2014 19:24:00 -0000	[thread overview]
Message-ID: <CADPb22RXM6xT7a4HMkFHkx1AvKcD3gRDZv6dY3ptRd-7_zeGzw@mail.gmail.com> (raw)
In-Reply-To: <CADPb22TX6AcZo6g-9to9Bet02FnJtmfCRzUUhy1H3VwLwOUG0A@mail.gmail.com>

On Tue, Jun 17, 2014 at 8:14 PM, Doug Evans <dje@google.com> wrote:
> On Tue, Jun 17, 2014 at 6:33 PM, Tom Tromey <tromey@redhat.com> wrote:
>> There are a number of global functions in the gdb Python module which
>> really should be methods on Progspace.  This patch adds new methods to
>> Progspace and then redefines these globals in terms of these new
>> methods.  It also adds an Inferior.progspace attribute so that the
>> association between inferiors and progspaces is obvious; this lets us
>> apply the same treatment to current_progspace.
>>
> [...]
> Hi.  A few comments inline.
>
> solib_name(pc)
>
> This doesn't feel right as an element of the API.
> What if pc is in the main executable?  Can't the answer be found via
> other means?
> We've exported objfiles, so what does this bring to the table that,
> say, objfile_name (pc) doesn't?
> Or even better(?), symtab_and_line(pc) is all that's really needed, isn't it?
> [since one can, I think, get the objfile from the symtab; and if not
> we should provide that]

I guess a pc could be found that is in an objfile, and not in a
symtab, so symtab_and_line(pc) can be insufficient. But that still
leaves objfile_for_pc (pc), or some such.
If the user wants the name s/he can get it from the objfile.

> [Maybe there is a compelling reason to have it that I'm not seeing though.]

Still holds of course.

      reply	other threads:[~2014-06-17 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 16:33 Tom Tromey
2014-06-17 16:41 ` Eli Zaretskii
2014-06-17 18:14 ` Doug Evans
2014-06-17 19:24   ` 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=CADPb22RXM6xT7a4HMkFHkx1AvKcD3gRDZv6dY3ptRd-7_zeGzw@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).