summaryrefslogtreecommitdiffstats
path: root/libbacktrace/UnwindMap.h
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-03-07 19:42:19 -0800
committerChristopher Ferris <cferris@google.com>2014-04-03 14:19:24 -0700
commite29609106033a48a6128664668d22bf4fb42a7ee (patch)
treec01cd6a8fd876b11a08ff0120af3f263d71b7b53 /libbacktrace/UnwindMap.h
parent223fc42b5e289e882f67c893374ffbef595a6901 (diff)
downloadcore-e29609106033a48a6128664668d22bf4fb42a7ee.tar.gz
core-e29609106033a48a6128664668d22bf4fb42a7ee.tar.bz2
core-e29609106033a48a6128664668d22bf4fb42a7ee.zip
Create an UnwindMapLocal object.
The way libunwind handles local unwinds is different from remote unwinds, so create a new map object to handle the differences. Add new test to verify the map data is being generated correctly. Add new tests to check for leaks. Refactor the BACK_LOGW code into a single header file. Change-Id: I01f3cbfc4b927646174ea1b614fa25d23b9b3427
Diffstat (limited to 'libbacktrace/UnwindMap.h')
-rw-r--r--libbacktrace/UnwindMap.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libbacktrace/UnwindMap.h b/libbacktrace/UnwindMap.h
index 5a874e887..2fdb29f8d 100644
--- a/libbacktrace/UnwindMap.h
+++ b/libbacktrace/UnwindMap.h
@@ -32,8 +32,25 @@ public:
unw_map_cursor_t* GetMapCursor() { return &map_cursor_; }
-private:
+protected:
+ virtual bool GenerateMap();
+
unw_map_cursor_t map_cursor_;
};
+class UnwindMapLocal : public UnwindMap {
+public:
+ UnwindMapLocal();
+ virtual ~UnwindMapLocal();
+
+ virtual bool Build();
+
+ virtual const backtrace_map_t* Find(uintptr_t addr);
+
+protected:
+ virtual bool GenerateMap();
+
+ bool map_created_;
+};
+
#endif // _LIBBACKTRACE_UNWIND_MAP_H