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] Make it easier to call into inferior from python when "this" pointer is already available?


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> This works, but is somewhat "unnatural": we already have 'self.val',
Paul> so a more intuitive expression would be something like:
Paul>   self.val.parse_and_eval_subexpr("->str()")
Paul> or some such. It would probably also be less work for GDB, since
Paul> Python is already holding a value for part of the evaluation stack.

Paul> Comments?

I think what we want to do is add more methods to Value, and in
particular a way to call inferior functions.  So, the above could be
something like:

    self.val.call_method('str')

There are probably some other holes in Value.


We also want a way to create expressions, though so far I think this
is mostly useful for a new language implementation, which isn't on my
near-term to-do list.  One fun idea here is that we can give
Expression the same API as Value.  Then you can write generic code
that either directly computes a value, or that creates the expression
to compute the value, depending on what you pass it.  Or is that too
wacky?

Tom


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