summaryrefslogtreecommitdiffstats
path: root/libbacktrace/UnwindCurrent.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbacktrace/UnwindCurrent.h')
-rw-r--r--libbacktrace/UnwindCurrent.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/libbacktrace/UnwindCurrent.h b/libbacktrace/UnwindCurrent.h
index 2375e6e..3023996 100644
--- a/libbacktrace/UnwindCurrent.h
+++ b/libbacktrace/UnwindCurrent.h
@@ -17,27 +17,32 @@
#ifndef _LIBBACKTRACE_UNWIND_CURRENT_H
#define _LIBBACKTRACE_UNWIND_CURRENT_H
+#include <stdint.h>
+#include <sys/types.h>
+#include <ucontext.h>
+
#include <string>
-#include "BacktraceImpl.h"
+#include <backtrace/Backtrace.h>
+#include <backtrace/BacktraceMap.h>
+
+#include "BacktraceCurrent.h"
#define UNW_LOCAL_ONLY
#include <libunwind.h>
-class UnwindCurrent : public BacktraceImpl {
+class UnwindCurrent : public BacktraceCurrent {
public:
- UnwindCurrent();
- virtual ~UnwindCurrent();
-
- virtual bool Unwind(size_t num_ignore_frames, ucontext_t* ucontext);
+ UnwindCurrent(pid_t pid, pid_t tid, BacktraceMap* map) : BacktraceCurrent(pid, tid, map) {}
+ virtual ~UnwindCurrent() {}
- virtual std::string GetFunctionNameRaw(uintptr_t pc, uintptr_t* offset);
+ std::string GetFunctionNameRaw(uintptr_t pc, uintptr_t* offset) override;
- bool UnwindFromContext(size_t num_ignore_frames, bool within_handler);
+private:
+ void GetUnwContextFromUcontext(const ucontext_t* ucontext);
- void GetUnwContextFromUcontext(const ucontext_t* context);
+ bool UnwindFromContext(size_t num_ignore_frames, ucontext_t* ucontext) override;
-protected:
unw_context_t context_;
};