public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54572] New: Use libbacktrace library
@ 2012-09-13 22:26 burnus at gcc dot gnu.org
  2012-09-15 11:26 ` [Bug fortran/54572] " hp at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-13 22:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54572

             Bug #: 54572
           Summary: Use libbacktrace library
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jb@gcc.gnu.org


Ian has created a shiny libbacktrace libray which should be used to replace the
current implementation in libgfortran/runtime/backtrace.c, which uses 
unwinder and, if available, addr2line.

libbacktrace is installed both as host library (i.e. for backtraces of the
compiler when an ICE occurs) and as target library, to be used by "go" and
possibly other users (e.g. libgfortran).


TODO:


a) Enable the building of the target library:

--- ./gcc/fortran/config-lang.in.orig   2011-05-10 23:12:01.000000000 +0200
+++ ./gcc/fortran/config-lang.in        2012-09-13 22:06:38.000000000 +0200
@@ -30 +30 @@ compilers="f951\$(exeext)"
-target_libs=target-libgfortran
+target_libs="target-libgfortran target-libbacktrace"


b) Add --disable-target-libbacktrace to the toplevel configure to disable
libbacktrace; e.g. for our embedded users. (toplevel implies a sync with
sourceware; watch out for "go" which also uses the target library, check that
"go" is still be working without target libbacktrace.)


c) Configure check: Check whether the library is available. (See
libgfortran/acinclude.m4's LIBGFOR_CHECK_FLOAT128 for some ideas how one can
test this.)

d) Configure check 2: Check whether BACKTRACE_SUPPORTED is set to 0 (->
backtrace-supported.h), in that case, it is also pointless to build the
support.



e) Replace the current version by calls to libbacktrace.

Almost latest version of the patch:
  http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00806.html
Or wait a while and browse libbacktrace/ directly.

  * backtrace-supported.h contains BACKTRACE_USES_MALLOC
    and BACKTRACE_SUPPORTED

  * Available functions are listed in backtrace.h


[The current version of libbacktrace only handles ELF+DWARF; one could consider
keeping the other version for a while. On the other hand, I assume that other
formats will soon be supported.]


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-08-23 21:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13 22:26 [Bug fortran/54572] New: Use libbacktrace library burnus at gcc dot gnu.org
2012-09-15 11:26 ` [Bug fortran/54572] " hp at gcc dot gnu.org
2012-09-16  8:33 ` jb at gcc dot gnu.org
2012-09-16 23:16 ` hp at gcc dot gnu.org
2012-11-25 15:10 ` jb at gcc dot gnu.org
2012-11-26 16:43 ` jb at gcc dot gnu.org
2012-11-26 16:46 ` jb at gcc dot gnu.org
2012-11-26 23:03 ` ian at airs dot com
2012-11-26 23:09 ` ian at airs dot com
2012-11-27  8:59 ` jb at gcc dot gnu.org
2012-11-27  9:33 ` burnus at gcc dot gnu.org
2012-11-27 10:06 ` burnus at gcc dot gnu.org
2012-11-30 21:56 ` jb at gcc dot gnu.org
2012-11-30 22:03 ` jb at gcc dot gnu.org
2012-12-01  6:43 ` ian at airs dot com
2012-12-01 19:48 ` jb at gcc dot gnu.org
2015-08-14  8:33 ` [Bug libfortran/54572] " fxcoudert at gcc dot gnu.org
2015-08-23 21:51 ` fxcoudert at gcc dot gnu.org
2015-08-23 21:52 ` fxcoudert at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).