This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Backtrace library [1/3]
On Tue, Sep 11, 2012 at 6:08 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Tue, Sep 11, 2012 at 4:01 PM, Gabriel Dos Reis
> <gdr@integrable-solutions.net> wrote:
>> On Tue, Sep 11, 2012 at 5:53 PM, Ian Lance Taylor <iant@google.com> wrote:
>>
>>> This patch is the interface to and configury of libbacktrace. I've
>>> separated these out as the parts of libbacktrace that require the most
>>> review. The interface to libbacktrace is in the file backtrace.h. This
>>> is what callers will use. The file backtrace-supported.h is also
>>> available so that programs can see whether calling the backtrace library
>>> will work at all.
>>
>> So, you've settled on a C interface? A C++ interface would have been
>> native for other open source projects that are C++ oriented...
>
> Yes, a C interface is convenient for libgo, and of course is generally
> usable. We can certainly layer a C++ interface on top if it seems
> useful.
>
> The interface is somewhat constrained in that, on systems that support
> anonymous mmap, it does not call malloc. That makes it possible to do
> a symbolic backtrace from a signal handler.
I actually liked the uses of mmap where possible -- as opposed to malloc.
(which is what I do in my own projects.)
I would have expected a C interface layer over a C++ interface, as opposed
to the other around....
-- gaby