Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siva Chandra <sivachandra@google.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>, Doug Evans <dje@google.com>
Subject: Re: [RFC - Python Scripting] New method Objfile.symtabs () - docs included
Date: Fri, 06 Apr 2012 16:42:00 -0000	[thread overview]
Message-ID: <CAGyQ6gxnOEjbhtM9k0hv1Hy7cgS9+vwdOPyozuBtCgvNsYa3jg@mail.gmail.com> (raw)
In-Reply-To: <CADPb22QhVip8xafOSPffWch-FUp+aY6J6+Ak-oyxQX01zAZadQ@mail.gmail.com>

Tom> How about just the plain Objfile.iterator(REGEX)?
Tom> It would return an iterator that lazily instantiates symtabs.
Tom> (Or, at least conceptually lazily instantiates them, as it isn't clear
Tom> that this is efficiently implementable with the current
Tom> quick_symbol_functions API.)

Is this equivalent to what Paul Koning suggests and has the same
problem which Doug Evans points out (source file matching with a REGEX
aside)?

Paul> How about having symtabs() return the iterator instead?

Doug> In a nutshell: If "list (objfile.symtabs())" can increase gdb's memory
Doug> usage by gigabytes, then it's a non-starter (IMO).
Doug> Before we provide anything along these lines, we need to fix the
Doug> underlying problem.

Doug> I can think of a simple(quick) solution: create the symtab object when
Doug> the psymtab object is created (suitably modified to clean up anything
Doug> obvious), but not expand it.  [btw, Psymtabs at the moment aren't as
Doug> much of an implementation detail as we want them to be (IMO).] It's
Doug> not perfect: Depending on what you want from the symtab you may
Doug> ultimately end up expanding everything anyway.  But it's a step.  One
Doug> way to go would be to build into gdb the ability to discard the
Doug> expansion say when memory gets tight.  I think there's room for
Doug> improvement before we get to that though.

I am OK to think through this proposal.  I will need some time to
understand and come up with something.

Thanks,
Siva Chandra


  reply	other threads:[~2012-04-06 16:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02  6:17 Siva Chandra
2012-04-02 17:08 ` Eli Zaretskii
2012-04-03  0:04 ` Doug Evans
2012-04-03  5:54   ` Siva Chandra
2012-04-05 16:30     ` Paul_Koning
2012-04-05 18:41       ` Tom Tromey
2012-04-05 18:37     ` Tom Tromey
2012-04-05 19:56 ` Paul_Koning
2012-04-05 20:26   ` Doug Evans
2012-04-06 16:42     ` Siva Chandra [this message]
2012-04-09 17:56       ` Tom Tromey
2012-04-09 17:59         ` 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=CAGyQ6gxnOEjbhtM9k0hv1Hy7cgS9+vwdOPyozuBtCgvNsYa3jg@mail.gmail.com \
    --to=sivachandra@google.com \
    --cc=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