Get rid of backtrace machinery

It is currently very fragile, due to:

* Differing versions of compilers/DWARF version result in a variety
    of breakages in the our code which analyzes the DWARF info;

* With musl, libunwind seems to be currently unable to traverse
    beyond signal handlers, due to the DWARF information not
    being present in the signal frame.
    See <https://maskray.me/blog/2022-04-10-unwinding-through-signal-handler>.
    Note that I have not verified that the problem in the blog
    post above is indeed what we're hitting, but it seems plausible.
This commit is contained in:
Francesco Mazzoli
2023-01-30 18:17:13 +00:00
parent 4243ff71e2
commit f42ff2b219
12 changed files with 13 additions and 263 deletions
-12
View File
@@ -4,12 +4,9 @@
#include <atomic>
#include <fcntl.h>
#include <cxxabi.h>
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#include "Common.hpp"
#include "BinaryFormatter.hpp"
#include "Backtrace.hpp"
#include "Exception.hpp"
const char *translateErrno(int _errno) {
@@ -181,15 +178,6 @@ std::string removeTemplates(const std::string & s) {
}
AbstractException::AbstractException() {
generateBacktrace(_stacktrace, sizeof(_stacktrace));
}
const char * AbstractException::getStackTrace() const {
return _stacktrace;
}
const char *EggsException::what() const throw() {
return _msg.c_str();
}