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: [02/15] Python interpreter callback functions


Tom Tromey wrote:

> I think this is ok as a default, but ideally the various Python
> methods would take an optional architecture argument.  That would mean
> having some Python representation of the architecture.

Right. 

> I think any place that acquires the GIL should probably also set the
> architecture.  I noticed that gdbpy_new_objfile was not touched in
> your patch; there may be other places as well.  Perhaps all this work
> could be done by a single convenience function, to make it harder to
> forget in the future.

Right, I overlooked gdbpy_new_objfile.  I'll fix that.  I can also
merge acquiring/releasing the GIL into make_cleanup_python_env ..

> If we had some notion of the "host architecture", then stuff like
> builtin_type_pyint could just use that instead.  Those defines really
> represent types on the host.

Note that even with my patch set applied, there are currently still 
some limitations on mixing and matching architectures.  For example,
you still cannot pass a value of arch A as argument to an inferior
function call of arch B.  These restrictions could presumably be
lifted over time, but for now, you'd have to deal with them if Python
values were of a different arch from the target ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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