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]

Re: [python][commit] Add interface for inferior manipulation.


I'm sorry for not getting back to you on this sooner.
And, actually, I still really haven't read the patch, I just wanted to
respond to one thing.

Thiago> I coded it this way because it seemed important/useful to always have
Thiago> only one Python object for each GDB inferior or thread. Perhaps I'll
Thiago> revisit this though, and create Python objects on demand (thus
Thiago> permitting more than one Python instance for each inferior or thread).

I think it is important to have a single Python object per GDB
object.  I don't like this situation with Type, where we can make
multiple new ones -- it is confusing to use objects that behave this
way.  I would like us to not add to this problem :-)

Managing the lifetimes of Python objects like this can be a pain.
But, for Inferior and InferiorThread, I think it would be ok to add a
field to the gdb core structures -- it may be more palatable to do
something like the objfile data thing, or otherwise just a plain
python object.  I think this is ok here because it is very unlikely
that these structures will ever be memory abusers; so, growing them by
a field just doesn't matter.

Tom


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