This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libbacktrace & plugins....
- From: Ian Lance Taylor <iant at google dot com>
- To: Basile Starynkevitch <basile at starynkevitch dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 20 May 2013 08:43:06 -0700
- Subject: Re: libbacktrace & plugins....
- References: <20130520143115 dot GA7260 at ours dot starynkevitch dot net>
On Mon, May 20, 2013 at 7:31 AM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
>
> Currently (for GCC 4.8 at least) when a plugin crashes (ie. SIGSEGV) libbacktrace is apparently not able
> to show backtrace information inside the plugin[s].
>
> I believe that, at least on GNU/Linux wich has dladdr, it would be nice to extend libbacktrace
> to show backtrace information inside plugins (at least those compiled with -g).
>
> Is is reasonably feasible? I'm not familiar with libbacktrace, but (since MELT would be very happy with that)
> I might perhaps help....
That is actually supposed to work already. The code is in
libbacktrace/elf.c. It calls dl_iterate_phdr to find all the shared
libraries loaded into the process. I never tested it with dlopen so I
can certainly believe that it doesn't work, but I don't know why it
doesn't work.
Ian