From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16971 invoked by alias); 10 Sep 2013 05:21:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16961 invoked by uid 89); 10 Sep 2013 05:21:07 -0000 Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 10 Sep 2013 05:21:07 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f175.google.com Received: by mail-wi0-f175.google.com with SMTP id ez12so194101wid.8 for ; Mon, 09 Sep 2013 22:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=OEEYMxMEWPMd9OFGLvfhCkAmKPlmIQMj/qZthvFPft8=; b=Ckenje0ocPZWEBxOhiQR8KQKuZ1UZnUEEWLXUOb1n+Ubd8eyPQFsSm2jr/itP98CpR gfBs3GCHm6sITFBRfWLrW5oMZaL7Edq1PZD1PGx7pzhgeVtXYYpv0Ld/yc9+vGPcwuyj 0fEv12ITqVw/J5sLvzuj86ZW+v3ZMzjbfB74ntiDVyQ5jyzSnba0qrexfgiZxIyqQ6PC OV77XDLYsvqKaC1jQ/XAmvCdxI+sXUMMR7upS70rQobGeZB3YONofM3hCIdGFBfqnb8o C00hXvuTU+vPXeh4TyP/k3ntfudNd5lkjbFD1LTQJqK2fWG2GtHeP49dE+41yDrbhI5x dm3A== X-Gm-Message-State: ALoCoQmgio7EmQxDKrgL7VvTD796FF//OD9QOe/rTVsconvp0+skI6qug60r5VklKkSR/cKlTKHv MIME-Version: 1.0 X-Received: by 10.180.73.40 with SMTP id i8mr11221204wiv.37.1378790463314; Mon, 09 Sep 2013 22:21:03 -0700 (PDT) Received: by 10.216.148.70 with HTTP; Mon, 9 Sep 2013 22:21:03 -0700 (PDT) In-Reply-To: <871u4xhfca.fsf@fleche.redhat.com> References: <871u4xhfca.fsf@fleche.redhat.com> Date: Tue, 10 Sep 2013 05:21:00 -0000 Message-ID: Subject: Re: beginnings of Guile support From: Doug Evans To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-09/txt/msg00320.txt.bz2 On Mon, Sep 9, 2013 at 2:09 PM, Tom Tromey wrote: >>>>>> "Doug" == Doug Evans 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.