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

Re: [patch][python] 1/3 Python representation of GDB line tables (Python code)


Phil Muldoon writes:
 > I've made the requested changes.  For the sake of brevity I have just
 > included the three file diffs this time around instead of mailing the
 > whole series.
 > 
 > This OK?

Thanks.

"works for me"

[I missed a few things in my previous review.  Blech.  Mea culpa.
There's a couple of function comments that don't have a blank
line between them and their function.  How could I have missed that??? :-)
Ok with those changes, no need for another iteration on my account.

Thanks again.



 > +/* Deconstructor for the line table object.  Decrement the reference
 > +   to the symbol table object before calling the default free.  */

Here.

 > +static void
 > +ltpy_dealloc (PyObject *self)
 > +{
 > +  linetable_object *obj = (linetable_object *) self;
 > +
 > +  Py_DECREF (obj->symtab);
 > +  Py_TYPE (self)->tp_free (self);
 > +}
 > +
 > +/* Initialize LineTable, LineTableEntry and LineTableIterator
 > +   objects.  */

Here.

 > +int
 > +gdbpy_initialize_linetable (void)
 > +{
 > +  if (PyType_Ready (&linetable_object_type) < 0)
 > +    return -1;
 > +  if (PyType_Ready (&linetable_entry_object_type) < 0)
 > +    return -1;
 > +  if (PyType_Ready (&ltpy_iterator_object_type) < 0)
 > +    return -1;
 > +
 > +  Py_INCREF (&linetable_object_type);
 > +  Py_INCREF (&linetable_entry_object_type);
 > +  Py_INCREF (&ltpy_iterator_object_type);
 > +
 > +  if (gdb_pymodule_addobject (gdb_module, "LineTable",
 > +			      (PyObject *) &linetable_object_type) < 0)
 > +    return -1;
 > +
 > +  if (gdb_pymodule_addobject (gdb_module, "LineTableEntry",
 > +			      (PyObject *) &linetable_entry_object_type) < 0)
 > +    return -1;
 > +
 > +  if (gdb_pymodule_addobject (gdb_module, "LineTableIterator",
 > +			      (PyObject *) &ltpy_iterator_object_type) < 0)
 > +    return -1;
 > +
 > +  return 0;
 > +}


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