This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

[python] fix crash in Symbol


This fixes a crash in Symbol.
You can see it with "python print gdb.Symbol()".
The fix is to not allow user construction of Symbol objects.

Tom

2009-04-07  Tom Tromey  <tromey@redhat.com>

	* python/python-symbol.c (gdbpy_initialize_symbols): Don't set
	tp_new.

diff --git a/gdb/python/python-symbol.c b/gdb/python/python-symbol.c
index c7fda5c..03d43c1 100644
--- a/gdb/python/python-symbol.c
+++ b/gdb/python/python-symbol.c
@@ -1,6 +1,6 @@
 /* Python interface to symbols.
 
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -235,7 +235,6 @@ PyObject *gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw)
 void
 gdbpy_initialize_symbols (void)
 {
-  symbol_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&symbol_object_type) < 0)
     return;
 


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