From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?R=FCdiger?= Sonderfeld Newsgroups: gmane.emacs.devel Subject: Re: clang vs free software Date: Tue, 21 Jan 2014 19:50:42 +0100 Message-ID: <3206611.eC84x4g1kX@descartes> References: <87fvqtg02v.fsf@flea.lifelogs.com> <3251502.USOysJnPn3@descartes> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1390330262 17320 80.91.229.3 (21 Jan 2014 18:51:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2014 18:51:02 +0000 (UTC) Cc: John Yates , Stefan Monnier , Richard Stallman , David Engster , emacs-devel@gnu.org To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 21 19:51:08 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W5gPk-0000qT-2Y for ged-emacs-devel@m.gmane.org; Tue, 21 Jan 2014 19:51:08 +0100 Original-Received: from localhost ([::1]:60026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5gPj-0000QB-Mo for ged-emacs-devel@m.gmane.org; Tue, 21 Jan 2014 13:51:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5gPb-0000P8-Up for emacs-devel@gnu.org; Tue, 21 Jan 2014 13:51:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5gPW-0006he-ID for emacs-devel@gnu.org; Tue, 21 Jan 2014 13:50:59 -0500 Original-Received: from ptmx.org ([178.63.28.110]:39976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5gPW-0006gn-BS; Tue, 21 Jan 2014 13:50:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id B44D72502C; Tue, 21 Jan 2014 19:50:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ptmx.org Original-Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nQGwPMq8J1wB; Tue, 21 Jan 2014 19:50:52 +0100 (CET) Original-Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id C470D20CCF; Tue, 21 Jan 2014 19:50:51 +0100 (CET) User-Agent: KMail/4.11.3 (Linux/3.11.0-14-generic; KDE/4.11.3; x86_64; ; ) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 178.63.28.110 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168846 Archived-At: On Tuesday 21 January 2014 17:38:13 joakim@verona.se wrote: > R=C3=BCdiger Sonderfeld writes: > > On Tuesday 21 January 2014 17:25:59 joakim@verona.se wrote: > >> > GCC provides a plugin interface now which can be used to extract= > >> > information about the source. I started writing a plugin and Em= acs > >> > interface based on that. It can show the callgraph, jump to > >> > definition, > >> > and show some information about symbols. You simply add it to y= our > >> > normal compiler call. But I didn't get very far and it requires = a > >> > patched > >> > version of the gcc-python plugin. > >> >=20 > >> > I hope I'll find enough time to continue working on it. Maybe C= lang > >> > provides better integration. But without an FFI it would have t= o be > >> > linked into Emacs. And GCC is the main compiler I use anyway. > >>=20 > >> Interesting. Do you know if the interfaces you use are also provid= ed via > >> gnome object introspection? Then I would love to try it out using = the > >> Emacs Xwidget branch, which provides an attempt at a GIR bridge fo= r > >> emacs. > >=20 > > I'm not loading any library in Emacs itself. I have written plugin= s for > > GCC. They are loaded during the compile process (add > > -fplugin=3D./gccetags.so to the CXXFLAGS) and write data to a file.= For > > gcc-etags to a file in etag format and for the other experiment a s= exp. > >=20 > > I haven't really looked at libclang. Which could be loaded through= an > > FFI. I doubt that they are using Glib though or what would be need= ed for > > gnome object introspection. >=20 > I meant if gcc could provide the feature you use via gir. GCC doesn't provide a real API. You basically get access to all of GCC= s=20 internal structures and functions. You write your module and compile i= t as a=20 shared library which is then loaded by GCC. See (info "(gccint) Plugins") I don't think gir could be used here and I don't think it would help. Regards, R=C3=BCdiger