Revert backtrace ban and start printing backtraces from the runtime again (#9528)

* Revert "[strip -ST] Disable runtime stack trace dumping on Darwin when asserts are disabled."
This reverts commit 6bc28ff1c9.
* Bring back important fixes from the revert of 6bc28ff1c9.
* Change swift::swift_reportError to only print the backtrace in assert builds (swift::warning prints backtrace always).
This commit is contained in:
Kuba (Brecka) Mracek
2017-05-12 15:46:35 -07:00
committed by GitHub
parent da08005c06
commit fc7dbefcf8
14 changed files with 19 additions and 157 deletions

View File

@@ -27,10 +27,6 @@
#include <link.h>
#include <string.h>
#ifndef SWIFT_RUNTIME_DLADDR_ALLOW
#error "SWIFT_RUNTIME_DLADDR_ALLOW must be defined!"
#endif
using namespace swift;
/// The symbol name in the image that identifies the beginning of the
@@ -162,7 +158,6 @@ void swift_addNewDSOImage(const void *addr) {
}
int swift::lookupSymbol(const void *address, SymbolInfo *info) {
#if SWIFT_RUNTIME_DLADDR_ALLOW
Dl_info dlinfo;
if (dladdr(address, &dlinfo) == 0) {
return 0;
@@ -173,9 +168,6 @@ int swift::lookupSymbol(const void *address, SymbolInfo *info) {
info->symbolName = dlinfo.dli_sname;
info->symbolAddress = dlinfo.dli_saddr;
return 1;
#else
return 0;
#endif
}
#endif // defined(__ELF__) || defined(__ANDROID__)