This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC - Python Scripting] New method Objfile.symtabs () - docs included
In this patch, you have an iterator that walks over the symtabs for an objfile, but that is only used internally in the symtabs() method which is written to return a list.
How about having symtabs() return the iterator instead? An iterator is usually just as good as a list (and more efficient); in the rare cases where you actually need the list, simply doing list(objfile.symtabs()) will do that.
paul