summaryrefslogtreecommitdiff
path: root/libunwindstack/DwarfCfa.h
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2017-07-14 10:37:19 -0700
committerChristopher Ferris <cferris@google.com>2017-07-14 12:20:23 -0700
commit81e61fa6964dfa45301b555ea1ae000bb97df07b (patch)
tree3b5a8dbdb189045d23108e26e6d0a2f4ca11940e /libunwindstack/DwarfCfa.h
parentc29ea6ea7802b15fa4eb07b02a4e73b599b3cc21 (diff)
downloadunwinding-81e61fa6964dfa45301b555ea1ae000bb97df07b.tar.gz
Make the library usable as a library.
- Add namespace unwindstack everywhere so that it's easier for other code to use the library. - Move some of the header files into include/unwindstack so that they can be exposed. - Modify the headers so that only a limited number need to be exposed. - Update the tools to use the new headers. - Add a GetLoadBias() call on the Elf object. This prevents the need to get the interface object out of the Elf object. - Move the GetRelPc() call out of the Reg class, to the Elf class. It's not always the case that a Reg object will be around when you want to get a relative pc. The tests for this moved to ElfTest.cpp. Bug: 23762183 Test: Unit tests pass. Change-Id: Iac609dac1dd90ed83d1a1e24ff2579c96c023bc3
Diffstat (limited to 'libunwindstack/DwarfCfa.h')
-rw-r--r--libunwindstack/DwarfCfa.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libunwindstack/DwarfCfa.h b/libunwindstack/DwarfCfa.h
index 42ebae1..62b9b7a 100644
--- a/libunwindstack/DwarfCfa.h
+++ b/libunwindstack/DwarfCfa.h
@@ -24,10 +24,13 @@
#include <type_traits>
#include <vector>
+#include <unwindstack/DwarfLocation.h>
+#include <unwindstack/DwarfMemory.h>
+#include <unwindstack/DwarfStructs.h>
+
#include "DwarfError.h"
-#include "DwarfLocation.h"
-#include "DwarfMemory.h"
-#include "DwarfStructs.h"
+
+namespace unwindstack {
// DWARF Standard home: http://dwarfstd.org/
// This code is based on DWARF 4: http://http://dwarfstd.org/doc/DWARF4.pdf
@@ -252,4 +255,6 @@ class DwarfCfa {
};
};
+} // namespace unwindstack
+
#endif // _LIBUNWINDSTACK_DWARF_CFA_H