From: Tobias Burnus <burnus@net-b.de>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
"'fortran@gcc.gnu.org'" <fortran@gcc.gnu.org>
Subject: [patch,fortran] Add -fdump-core option to coredump at library run-time errors (PR29649)
Date: Fri, 05 Jan 2007 21:24:00 -0000 [thread overview]
Message-ID: <459EC21E.7070204@net-b.de> (raw)
:ADDPATCH fortran:
Currently, when errors are detected in libgfortran, an error message is
shown; depending on the kind of error, it can be rather difficult to
find the place where the error occurred. And fiddling with the debugger
is also not easy (which symbol do you use for the break point?)
This patch adds the -fdump-core option, which causes libgfortran to
SIGQUIT itself (coredump).
This patch was extracted from Francois-Xavier's patch, posted at
http://gcc.gnu.org/ml/fortran/2006-11/msg00634.html
which also implemented backtracing.
The default setting is off. The setting can be changed both at compile
time (-fdump-core) and overwritten at run time via
the GFORTRAN_ERROR_DUMPCORE variable.
As set_std is modified, this makes the library incompatible with
previously compiled gfortran programs. One should thus either bump the
library version or consider to backport it to 4.2. (Suggestions?)
The initial patch was bootstrapped and regtested on x86_64-linux and
built and tested on sparc-solaris2.9 by FX.
This patch was bootstrapped and regtested by me on x86_64-linux.
Tobias
("configure" regenerated using autoconf 2.59 using --enable-maintainer-mode)
libgfortran/
2006-11-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Tobias Burnus <burnus@net-b.de>
PR fortran/29649
* runtime/environ.c (variable_table): New GFORTRAN_ERROR_DUMPCORE
environment variable.
* runtime/compile_options.c (set_std): Add new argument.
* runtime/error.c (sys_exit): Move from io/unix.c. Add coredump functionality.
* libgfortran.h (options_t): New dump_core and backtrace members.
(sys_exit): Move prototype.
* io/unix.c (sys_exit): Move to runtime/error.c.
* configure.ac: Add check for getrlimit.
* configure: Regenerate.
fortran/
2006-11-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Tobias Burnus <burnus@net-b.de>
PR fortran/29649
* gfortran.h (gfc_option_t): Add flag_dump_core.
* lang.opt: Add -fdump-core option.
* invoke.texi: Document the new options.
* trans-decl.c (gfc_build_builtin_function_decls): Add new
options to the call to set_std.
* options.c (gfc_init_options, gfc_handle_option): Set the
new options.
next reply other threads:[~2007-01-05 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 21:24 Tobias Burnus [this message]
[not found] ` <6113E044-201A-4840-8134-FAE8C096A185@gmail.com>
2007-01-06 10:21 ` Tobias Burnus
2007-01-06 14:48 ` libgfortran ABI compatibility / stability (was: Re: [patch,fortran] Add -fdump-core option to coredump at library run-time errors (PR29649)) FX Coudert
2007-01-06 17:08 ` Steve Kargl
2007-01-12 6:45 ` [patch,fortran] Add -fdump-core option to coredump at library run-time errors (PR29649) FX Coudert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459EC21E.7070204@net-b.de \
--to=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).