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]

[PATCH v2 00/13] script language API for GDB


On Thu, Dec 5, 2013 at 9:51 PM, Doug Evans <xdje42@gmail.com> wrote:
> Ok, let's try this again.
>
> On Thu, Dec 5, 2013 at 9:05 AM, Doug Evans <xdje42@gmail.com> wrote:
>> Hi.
>>
>> My patch set to add a scripting API to GDB is ready for submission.
>> It sets things up so that adding Guile scripting is straightforward.
>> I've cc'd guile-users to apprise them of my progress.
>> I'll spare them the actual set of patches here,
>> though I plan to cc them when submitting the Guile port,
>> their input will be helpful.
>> The actual Guile port is ready ... just have some more docs to write. :-)
>>
>> This patch set also has a nice effect of formalizing the interface from
>> GDB to Python (one aspect of which is that it removes the need for
>> a lot if #ifdef HAVE_PYTHON's, and it removes all the little stubs that
>> had to be provided when GDB was compiled --without-python).
>>
>> The main patches are 02 and 03.
>> 02 adds scripting.c, scripting.h, and scripting-priv.h.
>> 03 updates python.c, python.h, and python-internal.h.
>> The rest are pretty-straightforward.
>>
>> A lot of the change is mechanical:
>> - I want to have each ops "method" named ${lang}_${method_name}.
>> - Plus I want to have each API entry point have something in its
>>   name that says "I am a scripting API entry point".
>>   My first attempt used slang_ but that was thought to have
>>   to much potential confusion with the slang scripting language.
>>   Instead I've taken a minimalist approach and added "script"
>>   to the function name.
>>   E.g., apply_val_pretty_printer -> apply_val_script_pretty_printer
>> - Then I needed to move the interface enums defined in python.h
>>   out and make the values have non-python-specific names.
>>
>> I'm going to wait until after 7.7 has been branched
>> before checking anything in of course.
>>

Here's v2.
I've addressed all comments (I hope - anything missing is just oversight!).

Phil: re: changing gdbpy_breakpoint_object * in struct breakpoint to a
void * or some such: I wasn't thinking straight.  While only one
condition is allowed on a breakpoint, I can access the breakpoint from
each language.
So we need a gdbpy_breakpoint_object pointer and a
gdbscm_breakpoint_object pointer.

Per suggestion from Ludovic I renamed scripting.c to extension.c.
With that "slang" becomes "extlang", so that issue is gone.
[I'll update the Subject line in v3.]


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