- Timestamp:
- Apr 19, 2011, 11:12:07 PM (14 years ago)
- Location:
- clamav/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
clamav/trunk ¶
-
Property svn:mergeinfo
set to
/clamav/vendor/0.97 merged eligible
-
Property svn:mergeinfo
set to
-
TabularUnified clamav/trunk/libclamav/c++/llvm/lib/Support/PrettyStackTrace.cpp ¶
r189 r319 13 13 //===----------------------------------------------------------------------===// 14 14 15 #include "llvm/Config/config.h" // Get autoconf configuration settings 15 16 #include "llvm/Support/PrettyStackTrace.h" 16 17 #include "llvm/Support/raw_ostream.h" … … 18 19 #include "llvm/System/ThreadLocal.h" 19 20 #include "llvm/ADT/SmallString.h" 21 22 #ifdef HAVE_CRASHREPORTERCLIENT_H 23 #include <CrashReporterClient.h> 24 #endif 25 20 26 using namespace llvm; 21 27 … … 49 55 } 50 56 51 // Integrate with crash reporter. 52 #ifdef __APPLE__ 53 extern "C" const char *__crashreporter_info__; 54 const char *__crashreporter_info__ = 0; 57 // Integrate with crash reporter libraries. 58 #if defined (__APPLE__) && HAVE_CRASHREPORTERCLIENT_H 59 // If any clients of llvm try to link to libCrashReporterClient.a themselves, 60 // only one crash info struct will be used. 61 extern "C" { 62 CRASH_REPORTER_CLIENT_HIDDEN 63 struct crashreporter_annotations_t gCRAnnotations 64 __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION))) 65 = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0 }; 66 } 67 #elif defined (__APPLE__) && HAVE_CRASHREPORTER_INFO 68 static const char *__crashreporter_info__ = 0; 69 asm(".desc ___crashreporter_info__, 0x10"); 55 70 #endif 56 71 … … 58 73 /// CrashHandler - This callback is run if a fatal signal is delivered to the 59 74 /// process, it prints the pretty stack trace. 60 static void CrashHandler(void * Cookie) {75 static void CrashHandler(void *) { 61 76 #ifndef __APPLE__ 62 77 // On non-apple systems, just emit the crash stack trace to stderr. … … 72 87 73 88 if (!TmpStr.empty()) { 89 #ifdef HAVE_CRASHREPORTERCLIENT_H 90 // Cast to void to avoid warning. 91 (void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str()); 92 #elif HAVE_CRASHREPORTER_INFO 74 93 __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str()); 94 #endif 75 95 errs() << TmpStr.str(); 76 96 }
Note:
See TracChangeset
for help on using the changeset viewer.