diff options
author | Tom Tromey <tromey@redhat.com> | 2012-10-15 15:23:47 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-10-15 15:23:47 +0000 |
commit | 801e41852339ac13d7d302c5e58de5d7f55d640b (patch) | |
tree | 418a29c7d96f3b1152db4c35dda87560ed73923f /gdb/python/py-symtab.c | |
parent | 74f910c87c017f1f232e7a8f67daafc8072c1089 (diff) | |
download | gdb-801e41852339ac13d7d302c5e58de5d7f55d640b.zip gdb-801e41852339ac13d7d302c5e58de5d7f55d640b.tar.gz gdb-801e41852339ac13d7d302c5e58de5d7f55d640b.tar.bz2 |
PR python/14635:
* python/py-symtab.c (del_objfile_sal): Set 'symtab' field
to Py_None.
testsuite
* gdb.python/py-symtab.exp: Test sal and symtab destructors.
Diffstat (limited to 'gdb/python/py-symtab.c')
-rw-r--r-- | gdb/python/py-symtab.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c index b6f45e6..21a172c 100644 --- a/gdb/python/py-symtab.c +++ b/gdb/python/py-symtab.c @@ -470,7 +470,10 @@ del_objfile_sal (struct objfile *objfile, void *datum) { sal_object *next = obj->next; - obj->symtab = NULL; + Py_DECREF (obj->symtab); + obj->symtab = (symtab_object *) Py_None; + Py_INCREF (Py_None); + obj->next = NULL; obj->prev = NULL; xfree (obj->sal); |