// Code shared by runtime/runtime_android.cc and runtime/runtime_linux.cc.
#ifdefined(__APPLE__) // On macOS, _XOPEN_SOURCE must be defined to access ucontext // routines, as they are considered deprecated on that platform. #define _XOPEN_SOURCE #endif
struct Backtrace { public: explicit Backtrace(void* raw_context) : raw_context_(raw_context) {} void Dump(std::ostream& os) const { // This is a backtrace from a crash, do not skip any frames in case the // crash is in the unwinder itself.
DumpNativeStack(os, GetTid(), "\t", raw_context_, false);
} private: // Stores the context of the signal that was unexpected and will terminate the runtime. The // DumpNativeStack code will take care of casting it to the expected type. This is required // as our signal handler runs on an alternate stack. void* raw_context_;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.