Kaydet (Commit) f4680be8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

HAVE_FEATURE_CRASHDUMP instead of manual SAL_ENABLE_CRASH_REPORT

Change-Id: Ifaf971d77f11cef207706989bba11dbe2028ca79
üst b736204f
......@@ -146,4 +146,7 @@
*/
#define HAVE_FEATURE_COLLADA 0
/* see --enable-crashdump: */
#define HAVE_FEATURE_CRASHDUMP 0
#endif
......@@ -4537,6 +4537,7 @@ if test "$enable_crashdump" = "yes"; then
ENABLE_CRASHDUMP="TRUE"
BUILD_TYPE="$BUILD_TYPE CRASHREP"
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FEATURE_CRASHDUMP)
else
ENABLE_CRASHDUMP=""
AC_MSG_RESULT([no])
......
......@@ -176,8 +176,8 @@ $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/unx/time \
$(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \
))
$(eval $(call gb_Library_add_cobject,sal,sal/osl/unx/signal, \
$(if $(ENABLE_CRASHDUMP),-DSAL_ENABLE_CRASH_REPORT) \
$(eval $(call gb_Library_add_cobjects,sal, \
sal/osl/unx/signal \
))
# Note that the uunxapi.mm file just includes the uunxapi.cxx one
......
......@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <config_features.h>
/* system headers */
#include "system.h"
......@@ -25,7 +29,7 @@
#if defined( INTEL )
#include "backtrace.h"
#define INCLUDE_BACKTRACE
#ifdef SAL_ENABLE_CRASH_REPORT
#if HAVE_FEATURE_CRASHDUMP
#define STACKTYPE "MacOsX_X86"
#endif
#endif /* INTEL */
......@@ -36,7 +40,7 @@
#include <execinfo.h>
#include <link.h>
#define INCLUDE_BACKTRACE
#if defined SAL_ENABLE_CRASH_REPORT
#if HAVE_FEATURE_CRASHDUMP
#define STACKTYPE "Linux"
#endif
#endif
......@@ -46,7 +50,7 @@
#include "backtrace.h"
#define INCLUDE_BACKTRACE
#if defined SAL_ENABLE_CRASH_REPORT
#if HAVE_FEATURE_CRASHDUMP
#if defined( SPARC )
#define STACKTYPE "Solaris_Sparc"
#elif defined( INTEL )
......@@ -77,7 +81,7 @@
#define ACT_EXIT 2
#define ACT_SYSTEM 3
#define ACT_HIDE 4
#ifdef SAL_ENABLE_CRASH_REPORT
#if HAVE_FEATURE_CRASHDUMP
# define ACT_ABORT 5
#else
# define ACT_ABORT ACT_SYSTEM
......@@ -310,7 +314,7 @@ static sal_Bool DeInitSignal(void)
return sal_False;
}
#if defined (SAL_ENABLE_CRASH_REPORT) && defined(INCLUDE_BACKTRACE)
#if HAVE_FEATURE_CRASHDUMP && defined(INCLUDE_BACKTRACE)
static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen )
{
......@@ -389,8 +393,7 @@ static int fputs_xml( const char *string, FILE *stream )
/* Create intermediate files and run crash reporter */
#if defined SAL_ENABLE_CRASH_REPORT && defined INCLUDE_BACKTRACE && \
defined LINUX
#if HAVE_FEATURE_CRASHDUMP && defined INCLUDE_BACKTRACE && defined LINUX
typedef struct
{
......@@ -473,7 +476,7 @@ dynamic_section_offset(const char *name)
static int ReportCrash( int Signal )
{
#ifdef SAL_ENABLE_CRASH_REPORT
#if HAVE_FEATURE_CRASHDUMP
#define REPORTENV_PARAM "-crashreportenv:"
......@@ -794,12 +797,12 @@ static int ReportCrash( int Signal )
}
return 1;
#else /* defined SAL_ENABLE_CRASH_REPORT */
#else /* HAVE_FEATURE_CRASHDUMP */
/* the utility crash_report is not build, so do the same as when
the option -nocrashreport is used */
(void) Signal; // avoid warnings
return -1;
#endif /* defined SAL_ENABLE_CRASH_REPORT */
#endif /* HAVE_FEATURE_CRASHDUMP */
}
static void PrintStack( int sig )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment