Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@sceeck.org>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: beginnings of Guile support
Date: Tue, 10 Sep 2013 05:21:00 -0000	[thread overview]
Message-ID: <CAEei7h9HEJdweQkTsW2NaE_DGnqzXxm8DoZwmm-hdMcs7ixcOA@mail.gmail.com> (raw)
In-Reply-To: <871u4xhfca.fsf@fleche.redhat.com>

On Mon, Sep 9, 2013 at 2:09 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@sceeck.org> writes:
>
> Doug> As a personal project, I'm adding scheme scripting to gdb.
>
> I'd rather not put this in.  I think multiple scripting languages
> fragments the user community and leads to hard-to-debug problems.
>
> It also requires difficult cross-language integration.  Your patch skips
> the hard bits, but I think that is cheating -- those have to be fixed
> first.

I did all I could do to say the patch was preliminary and that there was
still a lot  to do.
Let's not get ahead of ourselves ...

If you have specific requirements, it would be good to know sooner
what they are.

> Doug> +slang_sourcer_func *
> Doug> +get_slang_sourcer (const char *file)
> Doug> +{
> Doug> +  if (has_extension (file, ".py"))
> Doug> +    {
> Doug> +#ifdef HAVE_PYTHON
> Doug> +      return python_scripting_interface.source_script;
> Doug> +#else
> Doug> +      return source_python_unsupported;
> Doug> +#endif
>
> I think there are too many #ifs of this form.
> It means the abstraction is incomplete.

The current incarnation isn't my favorite either.
Still working on that bit.

> Doug>  /* Variables used to pass information between the Breakpoint
> Doug>     constructor and the breakpoint-created hook function.  */
> Doug> -breakpoint_object *bppy_pending_object;
> Doug> +gdbpy_breakpoint_object *bppy_pending_object;
>
> Renamings ought to be separate patches.

When the patch is ready to be submitted RFA, it will be split up.
I was hoping to leave such things as givens.

> Doug> -/* Helper function that overrides this Python object's
> Doug> -   PyObject_GenericSetAttr to allow extra validation of the attribute
> Doug> -   being set.  */
> Doug> -
> Doug> -static int
> Doug> -local_setattro (PyObject *self, PyObject *name, PyObject *v)
> Doug> -{
> Doug> -  breakpoint_object *obj = (breakpoint_object *) self;
> [...]
>
> I'm not sure why this was deleted, but it also seems like it ought to be
> a separate patch, or maybe dropped.

Righto.

> Doug> +/* INCOMPLETE TODO LIST:
>
> I skimmed the guile code, but didn't read it heavily.
>
> I think anything that calls into Guile from gdb ought to prevent
> continuation capture.  Otherwise madness will ensue.  I don't know how
> you do that in Guile but I didn't see anything obvious in the code.

All calls to Scheme are gated through specific routines.
Still working on all the details.


      reply	other threads:[~2013-09-10  5:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 15:35 Doug Evans
2013-09-06 16:27 ` Phil Muldoon
2013-09-10  5:20   ` Doug Evans
2013-09-09 21:09 ` Tom Tromey
2013-09-10  5:21   ` Doug Evans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEei7h9HEJdweQkTsW2NaE_DGnqzXxm8DoZwmm-hdMcs7ixcOA@mail.gmail.com \
    --to=dje@sceeck.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox