On Mon, May 20, 2013 at 08:43:06AM -0700, Ian Lance Taylor wrote:
> On Mon, May 20, 2013 at 7:31 AM, Basile Starynkevitch
> <bas...@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.

Maybe I am wrong (I did not make any testcase for that). 
I very rarely have a SIGSEGV in MELT (because usually my own backtrace 
machinery works well), 
and when it happens it usually happens inside MELT generated C code which is 
dlopened 
(and not always compiled with -g) by the melt.so plugin. (so it is not a direct 
GCC plugin).

Sorry for the noise.

Cheers. 

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to