Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


"Lubos" == Lubos Lunak <l.lunak@suse.cz> writes:

Lubos>  This could be very useful ('catch throw' is so cumbersome in
Lubos> gdb),

Is there something we could do to improve it?

Lubos> but I think the first thing to check is if it would
Lubos> actually work. Last time I checked, "recent" features like
Lubos> -fvisibility make backtrace() very often generate call traces
Lubos> that are next to useless.

There are a few other approaches that are possible on Linux.

There is one that is part of GCC, libbacktrace.
It is its own library, but part of the GCC tree; so you'd have to
extract it.

Jan is also writing one based on elfutils.  It is in elfutils git but
not merged to master yet.

Also it can be done using the existing unwinder data, which already
exists for exception handling.  This is the approach libgcj took.
Specifically, it used this data to construct the list of PC values and
stash this in the exception; this was then transformed when actually
printing an exception.  The code in libgcj is a bit hairier than you
might need, since it had to handle interpreter and libffi frames
specially.  You could probably adapt it.

Tom

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.