ART: Detach libart-disassembler from libart
Some more intrusive changes than I would have liked, as long as
ART logging is different from libbase logging.
Fix up some includes.
Bug: 15436106
Bug: 31338270
Test: m test-art-host
Change-Id: I9fbe4b85b2d74e079a4981f3aec9af63b163a461
diff --git a/disassembler/disassembler.cc b/disassembler/disassembler.cc
index bcd0d16..8eecc62 100644
--- a/disassembler/disassembler.cc
+++ b/disassembler/disassembler.cc
@@ -18,15 +18,23 @@
#include <ostream>
-#include "base/logging.h"
-#include "base/stringprintf.h"
+#include "android-base/logging.h"
+#include "android-base/stringprintf.h"
+
#include "disassembler_arm.h"
#include "disassembler_arm64.h"
#include "disassembler_mips.h"
#include "disassembler_x86.h"
+using android::base::StringPrintf;
+
namespace art {
+Disassembler::Disassembler(DisassemblerOptions* disassembler_options)
+ : disassembler_options_(disassembler_options) {
+ CHECK(disassembler_options_ != nullptr);
+}
+
Disassembler* Disassembler::Create(InstructionSet instruction_set, DisassemblerOptions* options) {
if (instruction_set == kArm || instruction_set == kThumb2) {
return new arm::DisassemblerArm(options);
@@ -39,7 +47,7 @@
} else if (instruction_set == kX86_64) {
return new x86::DisassemblerX86(options, true);
} else {
- UNIMPLEMENTED(FATAL) << "no disassembler for " << instruction_set;
+ UNIMPLEMENTED(FATAL) << static_cast<uint32_t>(instruction_set);
return nullptr;
}
}