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.
This commit is contained in:
parent
74f910c87c
commit
801e418523
|
@ -1,3 +1,9 @@
|
||||||
|
2012-10-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
PR python/14635:
|
||||||
|
* python/py-symtab.c (del_objfile_sal): Set 'symtab' field
|
||||||
|
to Py_None.
|
||||||
|
|
||||||
2012-10-15 Tom Tromey <tromey@redhat.com>
|
2012-10-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR python/14634:
|
PR python/14634:
|
||||||
|
|
|
@ -470,7 +470,10 @@ del_objfile_sal (struct objfile *objfile, void *datum)
|
||||||
{
|
{
|
||||||
sal_object *next = obj->next;
|
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->next = NULL;
|
||||||
obj->prev = NULL;
|
obj->prev = NULL;
|
||||||
xfree (obj->sal);
|
xfree (obj->sal);
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-10-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* gdb.python/py-symtab.exp: Test sal and symtab destructors.
|
||||||
|
|
||||||
2012-10-15 Tom Tromey <tromey@redhat.com>
|
2012-10-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.python/py-symbol.exp: Test symbol destructor.
|
* gdb.python/py-symbol.exp: Test symbol destructor.
|
||||||
|
|
|
@ -73,3 +73,6 @@ gdb_test "python print \"simple_struct\" in static_symbols" "True" "Test simple_
|
||||||
gdb_unload
|
gdb_unload
|
||||||
gdb_test "python print sal.is_valid()" "False" "Test sal.is_valid"
|
gdb_test "python print sal.is_valid()" "False" "Test sal.is_valid"
|
||||||
gdb_test "python print symtab.is_valid()" "False" "Test symtab.is_valid()"
|
gdb_test "python print symtab.is_valid()" "False" "Test symtab.is_valid()"
|
||||||
|
|
||||||
|
gdb_test_no_output "python sal = None" "Test sal destructor"
|
||||||
|
gdb_test_no_output "python symtab = None" "Test symtab destructor"
|
||||||
|
|
Loading…
Reference in New Issue