diff --git a/libbacktrace/UnwindStackMap.cpp b/libbacktrace/UnwindStackMap.cpp index a9121a800..e7e5e4c43 100644 --- a/libbacktrace/UnwindStackMap.cpp +++ b/libbacktrace/UnwindStackMap.cpp @@ -96,6 +96,10 @@ std::string UnwindStackMap::GetFunctionName(uintptr_t pc, uintptr_t* offset) { return name; } +std::shared_ptr UnwindStackMap::GetProcessMemory() { + return process_memory_; +} + //------------------------------------------------------------------------- // BacktraceMap create function. //------------------------------------------------------------------------- diff --git a/libbacktrace/UnwindStackMap.h b/libbacktrace/UnwindStackMap.h index 2a8af839d..bc432e745 100644 --- a/libbacktrace/UnwindStackMap.h +++ b/libbacktrace/UnwindStackMap.h @@ -35,6 +35,7 @@ class UnwindStackMap : public BacktraceMap { void FillIn(uintptr_t addr, backtrace_map_t* map) override; virtual std::string GetFunctionName(uintptr_t pc, uintptr_t* offset) override; + virtual std::shared_ptr GetProcessMemory() override final; unwindstack::Maps* stack_maps() { return stack_maps_.get(); } diff --git a/libbacktrace/include/backtrace/BacktraceMap.h b/libbacktrace/include/backtrace/BacktraceMap.h index 104479d71..e176c783b 100644 --- a/libbacktrace/include/backtrace/BacktraceMap.h +++ b/libbacktrace/include/backtrace/BacktraceMap.h @@ -46,6 +46,10 @@ struct backtrace_map_t { std::string name; }; +namespace unwindstack { +class Memory; +} + class BacktraceMap { public: // If uncached is true, then parse the current process map as of the call. @@ -64,6 +68,7 @@ public: // Only supported with the new unwinder. virtual std::string GetFunctionName(uintptr_t /*pc*/, uintptr_t* /*offset*/) { return ""; } + virtual std::shared_ptr GetProcessMemory() { return nullptr; } // The flags returned are the same flags as used by the mmap call. // The values are PROT_*.