From 35cd7ecbad4926fc3d59fc949ad8232549f63168 Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sat, 31 Jan 2009 13:50:17 +0000 Subject: When UnixLib 5 is used, use its API to do the coredumping. Define UnixEnv$coredump (value needs to be a directory to where the coredump files can be written too) instead of NetSurf$CoreDump to enable this. svn path=/trunk/netsurf/; revision=6321 --- riscos/gui.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'riscos') diff --git a/riscos/gui.c b/riscos/gui.c index 348db5d0e..cea055bf0 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -4,7 +4,7 @@ * Copyright 2003 John M Bell * Copyright 2005 Richard Wilson * Copyright 2004 Andrew Timmins - * Copyright 2004-2008 John Tytgat + * Copyright 2004-2009 John Tytgat * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -154,7 +154,9 @@ int __feature_imagefs_is_file = 1; /**< For UnixLib. */ /* default filename handling */ int __riscosify_control = __RISCOSIFY_NO_SUFFIX | __RISCOSIFY_NO_REVERSE_SUFFIX; +#ifndef __ELF__ extern int __dynamic_num; +#endif const char * NETSURF_DIR; @@ -865,6 +867,7 @@ void ro_gui_signal(int sig) options_dump(); /*rufl_dump_state();*/ +#ifndef __ELF__ /* save WimpSlot and DA to files if NetSurf$CoreDump exists */ int used; xos_read_var_val_size("NetSurf$CoreDump", 0, 0, &used, 0, 0); @@ -890,6 +893,13 @@ void ro_gui_signal(int sig) base_address + size); } } +#else + /* Save WimpSlot and UnixLib managed DAs when UnixEnv$coredump + * defines a coredump directory. */ + _kernel_oserror *err = __unixlib_write_coredump (NULL); + if (err != NULL) + LOG(("Coredump failed: %s", err->errmess)); +#endif xhourglass_colours(old_sand, old_glass, 0, 0); xhourglass_off(); -- cgit v1.2.3