This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC - Python Scripting] New method gdb.Symtab.blocks_iterator - docs included


On Tue, Apr 10, 2012 at 12:44 AM, Siva Chandra <sivachandra@google.com> wrote:
> Thanks Eli and Tom for taking a look.
>
> Tom, I have addressed all your comments. ?For some of them, I have my
> own comments below. ?The updated patch is attached.
>
> Code -
> 2012-04-10 ?Siva Chandra Reddy ?<sivachandra@google.com>
>
> ? ? ? ?Add a new method gdb.Symtab.blocks to iterate
> ? ? ? ?over the scope blocks of a symbol table.
> ? ? ? ?* NEWS (Python scripting): Add entry about the new method.
> ? ? ? ?* python/py-symtab.c (symtab_blocks_iterator_object): New
> ? ? ? ?iterator type to iterate over the scope blocks of a symtab.
> ? ? ? ?(stpy_blocks): New function which implements the new method.
> ? ? ? ?(symtab_blocks_iterator_dealloc): New function which serves
> ? ? ? ?as the tp_dealloc function for symtab_blocks_iterator_object.
> ? ? ? ?(symtab_blocks_iterator_iter): New function which serves as
> ? ? ? ?the tp_iter function for symtab_blocks_iterator_object.
> ? ? ? ?(symtab_blocks_iterator_iternext): New function which serves as
> ? ? ? ?the tp_iternext function for symtab_blocks_iterator_object.
> ? ? ? ?(gdbpy_initialize_symtabs): Add initializations for the new
> ? ? ? ?iterator type.

[filed for reference sake]
I can imagine bug fixes and improvements meaning that iterating over
blocks can give different results one gdb release to the next.
I don't want our hands tied because we're afraid of breaking someone's
python script.  This is an area where I can easily imagine change.

I'm not saying this can't go in, to the contrary.
But IWBN to have it written down somewhere that we make no promises of
absolute consistency one release to the next.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]