In the gdb.Macro class, I didn't used methods instead of attributes, because the values are lazily computed/can return different objects if called multiple times, thus attributes seemed weird, even though I think the Macro methods are fairly attribute like. so if anyone has any opinion here on attributes vs methods. contains one unrelated change, to stpy_dealloc which seemed to leak. its missing macro expansion, user defined macros, a sal/scoped version of the macros() method and whatever else anyone can think of, will save that for another time. 2011-08-15 Matt Rice PR python/10807 * NEWS: Mention new macro api. * Makefile.in: Add py-macro.c. * python/py-macro.c: New file. * python/py-objfile.c (objfpy_symtab): New function. (objfile_getset): Add symtab attribute. * python/py-symtab.c (add_macro_to_list, stpy_macros, salpy_macro_named): New functions. (stpy_dealloc): Free the PyObject. (symtab_object_methods): Add macros method. (sal_object_methods): Add macro_named method. * python/py-symtab.h: New File: (symtab_to_symtab_object): Make public. * python/python.h: Add gdb_initialize_macros. * python/python.c: Call gdb_initialize_macros. 2011-08-15 Matt Rice * gdb.python/py-macro.c: New file. * gdb.python/py-macro.exp: Ditto. 2011-08-15 Matt Rice * gdb.texinfo (Macros In Python): New section. (Symbols In Python): Add macro_named, and macros methods. (Objfiles In Python): Add symtab attribute.