From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17717 invoked by alias); 31 Oct 2006 18:37:52 -0000 Received: (qmail 17637 invoked by uid 48); 31 Oct 2006 18:37:39 -0000 Date: Tue, 31 Oct 2006 18:37:00 -0000 Message-ID: <20061031183739.17636.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/29649] Force core dump on runtime library errors In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg02722.txt.bz2 List-Id: ------- Comment #6 from burnus at gcc dot gnu dot org 2006-10-31 18:37 ------- > Using unwind is the way to go for a more serious solution. Looks nice as a starting point. (My biggest problem with developing this would be to find out whether it works on strange machines like Sparc, Windows etc.) > It's how java does it, for example (with addr2line to get file > and line information). [to spare others the searching] addr2line is part of binutils. Using binutils' libbfd, resolving the symbols could be resolved compareably easily. (At least it looks like this, glancing at binutils/addr2line.c). Thus, in total I think I would like to have the following in gfortran: - Support for coredumps (compile time? Environment variable? The latter overwriting the former?) [Advantage compile-time option: The core is there, if one needs it. Advantage run-time option: One can quickly turn it on, if needed.] - Traceback support more or less as outlined above (comment 4, comment 3), which prints only the Hex address (similar to the unwind.diff, attachment 12519) or the backtrace_symbols() example in comment 3). One should mention the addr2line program in the manpage/manual. - Optionally, linking with libbfd and providing symbol-resolved traceback. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29649