summaryrefslogtreecommitdiff
path: root/libgfortran/runtime/environ.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 12:54:11 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 12:54:11 +0000
commitb7fcd3f95fa452127c1b12fdc0d702784bccff60 (patch)
tree35528f51b61de752d5ace70f20f9840ecaf371df /libgfortran/runtime/environ.c
parent9acadc12bc67e6cdb73fd376f3087e49b2919e23 (diff)
downloadgcc-b7fcd3f95fa452127c1b12fdc0d702784bccff60.tar.gz
2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Tobias Burnus <burnus@net-b.de> PR libfortran/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. 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr> Tobias Burnus <burnus@net-b.de> PR libfortran/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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime/environ.c')
-rw-r--r--libgfortran/runtime/environ.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index 21c2cc9f717..cc3be215c36 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -537,6 +537,11 @@ static variable variable_table[] = {
{"GFORTRAN_CONVERT_UNIT", 0, 0, init_unformatted, show_string,
"Set format for unformatted files", 0},
+ /* Behaviour when encoutering a runtime error. */
+ {"GFORTRAN_ERROR_DUMPCORE", -1, &options.dump_core,
+ init_boolean, show_boolean,
+ "Dump a core file (if possible) on runtime error", -1},
+
{NULL, 0, NULL, NULL, NULL, NULL, 0}
};