2012-05-03 Siva Chandra Reddy <sivachandra@google.com>
Add two new methods global_block and static_block to gdb.Symtab objects. * NEWS (Python scripting): Add entry about the new methods. * python/py-symtab.c (stpy_global_block): New function which implements the gdb.Symtab.global_block() method. (stpy_static_block): New function which implements the gdb.Symtab.static_block() method. (symtab_object_methods): Add entries for the two new methods. * testsuite/gdb.python/py-symbol.exp: Add tests to test the new methods gdb.Symtab.global_block() and gdb.Symtab.static_block(). * tessuite/gdb.python/py-symbol.c: Add new struct to help test gdb.Symtab.static_block(). * doc/gdb.texinfo (Symbol Tables In Python): Add documentation about the new methods global_block and static_block on gdb.Symtab objects.
This commit is contained in:
parent
bf2f0858b1
commit
a20ee7a4a9
8 changed files with 94 additions and 0 deletions
|
@ -44,6 +44,11 @@ int func (int arg)
|
|||
return arg; /* Block break here. */
|
||||
}
|
||||
|
||||
struct simple_struct
|
||||
{
|
||||
int a;
|
||||
};
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
|
@ -51,6 +56,7 @@ int main (int argc, char *argv[])
|
|||
#endif
|
||||
int a = 0;
|
||||
int result;
|
||||
struct simple_struct ss = { 10 };
|
||||
enum tag {one, two, three};
|
||||
enum tag t = one;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue