This is the mail archive of the gdb@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: repo to work on python scripting support


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

>> I've been thinking... maybe we do want $(...) to allow things other
>> than Python commands.  Or, more precisely, maybe we want to let Python
>> code register a function by name for use in $(...).  The Python
>> function would get the uninterpreted string argument for processing.

Doug> OOC, Would there be an intent to not disallow dynamically loaded C/C++
Doug> instead of Python for $(foo)? [Emphasis on OOC.]

I think once we've decided to do some extra parsing of $(...), instead
of just passing it verbatim to Python for interpretation, we can do
whatever we like.  I wouldn't be opposed to being able to register new
functions implemented in C.

>> break inner if $(gdb.caller_is ('outer'))

Doug> Parsing two separate languages in one line is problematic too (I'm not
Doug> sure how far the Pythonic version was intended to be interpreted).

In the current implementation the `...' in $(...) is just passed to
Python for evaluation.  So, it has to follow Python quoting rules, for
instance.

This is simple to implement :), but I think yields a not-very-nice
user experience.

Tom


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