diff options
author | sb <sb@openoffice.org> | 2010-05-20 15:46:46 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-05-20 15:46:46 +0200 |
commit | 662272563751a94c57e6f70c06bfca371feca3a5 (patch) | |
tree | 69698864e382d1a195dc6dce8170c8dcf428744f /sal | |
parent | 9a1b48db5c411833ac9c1eff2fdbda214d4db472 (diff) | |
parent | 74d8cb40231719fb9fa4237502e41a5b6cdcfbe1 (diff) |
sb120: merged in DEV300_m78
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/signal.c | 91 | ||||
-rw-r--r-- | sal/rtl/source/macro.hxx | 2 | ||||
-rw-r--r-- | sal/typesconfig/typesconfig.c | 2 |
3 files changed, 45 insertions, 50 deletions
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c index c5141fa02260..5563375d9567 100644 --- a/sal/osl/unx/signal.c +++ b/sal/osl/unx/signal.c @@ -74,10 +74,14 @@ #include "file_path_helper.h" #define ACT_IGNORE 1 -#define ACT_ABORT 2 -#define ACT_EXIT 3 -#define ACT_SYSTEM 4 -#define ACT_HIDE 5 +#define ACT_EXIT 2 +#define ACT_SYSTEM 3 +#define ACT_HIDE 4 +#ifdef SAL_ENABLE_CRASH_REPORT +# define ACT_ABORT 5 +#else +# define ACT_ABORT ACT_SYSTEM +#endif #define MAX_PATH_LEN 2048 @@ -556,7 +560,7 @@ static int ReportCrash( int Signal ) if (Signals[i].Signal == Signal && Signals[i].Action == ACT_ABORT ) { int ret; - char szShellCmd[512]; + char szShellCmd[512] = { '\0' }; char *pXMLTempName = NULL; char *pStackTempName = NULL; char *pChecksumTempName = NULL; @@ -728,68 +732,57 @@ static int ReportCrash( int Signal ) if ( checksumout ) fclose( checksumout ); -#if defined( LINUX ) - if ( pXMLTempName && pChecksumTempName && pStackTempName ) - snprintf( szShellCmd, sizeof(szShellCmd)/sizeof(szShellCmd[0]), - "crash_report -p %d -s %d -xml %s -chksum %s -stack %s%s", - getpid(), - Signal, - pXMLTempName, - pChecksumTempName, - pStackTempName, - bAutoCrashReport ? " -noui -send" : " -noui" ); -#elif defined( MACOSX ) if ( pXMLTempName && pChecksumTempName && pStackTempName ) +#endif /* INCLUDE_BACKTRACE */ { - rtl_uString *crashrep_url = NULL; - rtl_uString *crashrep_path = NULL; - rtl_String *crashrep_path_system = NULL; - - rtl_string2UString( &crashrep_url, RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program/crash_report.bin"), OSTRING_TO_OUSTRING_CVTFLAGS ); - rtl_bootstrap_expandMacros( &crashrep_url ); - osl_getSystemPathFromFileURL( crashrep_url, &crashrep_path ); + rtl_uString * crashrep_url = NULL; + rtl_uString * crashrep_path = NULL; + rtl_String * crashrep_path_system = NULL; + rtl_string2UString( + &crashrep_url, + RTL_CONSTASCII_USTRINGPARAM( + "$BRAND_BASE_DIR/program/crashrep"), + OSTRING_TO_OUSTRING_CVTFLAGS); + rtl_bootstrap_expandMacros(&crashrep_url); + osl_getSystemPathFromFileURL(crashrep_url, &crashrep_path); rtl_uString2String( &crashrep_path_system, - rtl_uString_getStr( crashrep_path ), - rtl_uString_getLength( crashrep_path ), + rtl_uString_getStr(crashrep_path), + rtl_uString_getLength(crashrep_path), osl_getThreadTextEncoding(), - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR ); - - rtl_uString_release( crashrep_url ); - rtl_uString_release( crashrep_path ); - + (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR + | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)); + rtl_uString_release(crashrep_url); + rtl_uString_release(crashrep_path); +#if defined INCLUDE_BACKTRACE && (defined LINUX || defined MACOSX) snprintf( szShellCmd, sizeof(szShellCmd)/sizeof(szShellCmd[0]), - "%s -p %d -s %d -xml %s -chksum %s -stack %s%s", - rtl_string_getStr( crashrep_path_system ), + "%s -p %d -s %d -xml %s -chksum %s -stack %s -noui%s", + rtl_string_getStr(crashrep_path_system), getpid(), Signal, pXMLTempName, pChecksumTempName, pStackTempName, - bAutoCrashReport ? " -noui -send" : " -noui" ); - - rtl_string_release( crashrep_path_system ); - - printf( "%s\n", szShellCmd ); - } -#elif defined ( SOLARIS ) - if ( pXMLTempName && pChecksumTempName ) + bAutoCrashReport ? " -send" : "" ); +#elif defined INCLUDE_BACKTRACE && defined SOLARIS snprintf( szShellCmd, sizeof(szShellCmd)/sizeof(szShellCmd[0]), - "crash_report -p %d -s %d -xml %s -chksum %s%s", + "%s -p %d -s %d -xml %s -chksum %s -noui%s", + rtl_string_getStr(crashrep_path_system), getpid(), Signal, pXMLTempName, pChecksumTempName, - bAutoCrashReport ? " -noui -send" : " -noui" ); + bAutoCrashReport ? " -send" : "" ); +#else + snprintf( szShellCmd, sizeof(szShellCmd)/sizeof(szShellCmd[0]), + "%s -p %d -s %d -noui%s", + rtl_string_getStr(crashrep_path_system), + getpid(), Signal, bAutoCrashReport ? " -send" : "" ); #endif + rtl_string_release(crashrep_path_system); + } -#else /* defined INCLUDE BACKTRACE */ - snprintf( szShellCmd, sizeof(szShellCmd)/sizeof(szShellCmd[0]), - "crash_report -p %d -s %d%s", getpid(), Signal, bAutoCrashReport ? " -noui -send" : " -noui" ); -#endif /* defined INCLUDE BACKTRACE */ - - - ret = system( szShellCmd ); + ret = szShellCmd[0] == '\0' ? -1 : system( szShellCmd ); if ( pXMLTempName ) unlink( pXMLTempName ); diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx index a48918668f83..50f0d7de924e 100644 --- a/sal/rtl/source/macro.hxx +++ b/sal/rtl/source/macro.hxx @@ -89,6 +89,8 @@ this is inserted for the case that the preprocessor ignores error # define THIS_ARCH "M68K" #elif defined HPPA # define THIS_ARCH "HPPA" +#elif defined AXP +# define THIS_ARCH "ALPHA" #endif #if ! defined THIS_ARCH diff --git a/sal/typesconfig/typesconfig.c b/sal/typesconfig/typesconfig.c index 8223c80a5856..708837be926b 100644 --- a/sal/typesconfig/typesconfig.c +++ b/sal/typesconfig/typesconfig.c @@ -160,7 +160,7 @@ int check( TestFunc func, Type eT, void* p ) |* Letzte Aenderung |* *************************************************************************/ -#if defined(IA64) || defined(ARM32) || defined(HPPA) +#if defined(IA64) || defined(ARM32) || defined(HPPA) || defined(AXP) int forceerror() { |