This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 5/5] add libcc1
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Cc: DJ Delorie <dj at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2014 11:10:30 +0000
- Subject: Re: [PATCH 5/5] add libcc1
- Authentication-results: sourceware.org; auth=none
- References: <53D9CA7B dot 3040709 at redhat dot com> <5436504B dot 8060902 at redhat dot com> <54385676 dot 4000004 at redhat dot com> <5449FC98 dot 1060404 at redhat dot com> <544A8162 dot 1090107 at redhat dot com> <544E9CE5 dot 602 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1410281315200 dot 3342 at digraph dot polyomino dot org dot uk> <544FD432 dot 8090004 at redhat dot com> <20141029102817 dot GP10376 at tucnak dot redhat dot com> <5450C376 dot 6000206 at gnu dot org> <20141029105132 dot GS10376 at tucnak dot redhat dot com> <5450C728 dot 3080004 at gnu dot org>
On 29/10/14 10:53, Paolo Bonzini wrote:
> On 10/29/2014 11:51 AM, Jakub Jelinek wrote:
>> On Wed, Oct 29, 2014 at 11:37:42AM +0100, Paolo Bonzini wrote:
>>> On 10/29/2014 11:28 AM, Jakub Jelinek wrote:
>>>> If this passes bootstrap/regtest, is it ok for trunk (should fix
>>>> two bootstrap issues)? Is the
>>>> patch ok too (that one already tested; another bootstrap issue)?
>>> Both seem okay, though I'd have to look at the whole thread to
>>> understand what libcc1 is. :)
>> It is a library for communication between the debugger and
>> a GCC plugin (and the plugin itself). So, the library is
>> dlopened into GDB and the plugin that links against that library
>> is dlopened by GCC when GDB asks the library it dlopened to
>> run the compiler with the plugin.
Adding on to what Jakub said, it allows GDB access to GCC's parser.
There are a number of reasons why, but right now that means we can
compile code snippets in GDB (without the source of the current
inferior), allow access to symbols of that inferior in that source
snippet, etc. We then inject and execute it.
We are currently writing a wiki article about it. Not required reading
or anything, but more information for the curious.
(That is a work in progress). There is also a video of a presentation
I did at Cauldron somewhere.