public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch,fortran] Add -fdump-core option to coredump at library run-time  errors (PR29649)
@ 2007-01-05 21:24 Tobias Burnus
       [not found] ` <6113E044-201A-4840-8134-FAE8C096A185@gmail.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tobias Burnus @ 2007-01-05 21:24 UTC (permalink / raw)
  To: gcc-patches, 'fortran@gcc.gnu.org'

: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.

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

end of thread, other threads:[~2007-01-12  6:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-05 21:24 [patch,fortran] Add -fdump-core option to coredump at library run-time errors (PR29649) Tobias Burnus
     [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

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).