From: Tom Tromey <tromey@redhat.com>
To: Siva Chandra <sivachandra@google.com>
Cc: Doug Evans <dje@google.com>, gdb-patches@sourceware.org
Subject: Re: [RFC - Python Scripting] New method Objfile.symtabs () - docs included
Date: Thu, 05 Apr 2012 18:37:00 -0000 [thread overview]
Message-ID: <87limaf2k8.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAGyQ6gwwnySK=2hxRj9fWDsxKt0Vqan7O_Lb3hrQt7gX7Me1SA@mail.gmail.com> (Siva Chandra's message of "Tue, 3 Apr 2012 11:24:34 +0530")
>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:
Siva> For the memory problem you point out, do you think something like
Siva> Objfile.symtabs (regex, [symbol_type]) would be good? REGEX is a file
Siva> name matcher to specify that only those symtabs whose source file
Siva> names match the REGEX should be loaded, and SYMBOL_TYPE is to specify
Siva> that only symbols of this kind should be loaded. This can still be
Siva> abused to match everything and load everything, but it is at the
Siva> user's own peril.
I think this proposed API mixes symtab- and symbol-level operations.
The file name is a property of a symtab, but the symbol type is a
property of the symbol.
There's presently no way in gdb to load just part of a symtab.
CUs are always fully instantiated. This could be changed -- I think it
is a good idea with more than one concrete benefit -- but it doesn't
exist now.
How about just the plain Objfile.iterator(REGEX)?
It would return an iterator that lazily instantiates symtabs.
(Or, at least conceptually lazily instantiates them, as it isn't clear
that this is efficiently implementable with the current
quick_symbol_functions API.)
Tom
next prev parent reply other threads:[~2012-04-05 18:37 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 [this message]
2012-04-05 19:56 ` Paul_Koning
2012-04-05 20:26 ` Doug Evans
2012-04-06 16:42 ` Siva Chandra
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=87limaf2k8.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=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