Store the instruction set in the oat header, and use it in oatdump.
Change-Id: I5cc4b853c3ebf1efcc1feb14ce05c97ceabe2c3e
diff --git a/src/oatdump.cc b/src/oatdump.cc
index c7b8151..d2ceb5e 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -86,8 +86,8 @@
class OatDumper {
public:
explicit OatDumper(const OatFile& oat_file) : oat_file_(oat_file),
- oat_dex_files_(oat_file.GetOatDexFiles()), disassembler_(Disassembler::Create(kArm)) {
- // TODO: the disassembler should find the oat file instruction set from the oat header
+ oat_dex_files_(oat_file.GetOatDexFiles()),
+ disassembler_(Disassembler::Create(oat_file_.GetOatHeader().GetInstructionSet())) {
AddAllOffsets();
}
@@ -100,6 +100,9 @@
os << "CHECKSUM:\n";
os << StringPrintf("0x%08x\n\n", oat_header.GetChecksum());
+ os << "INSTRUCTION SET:\n";
+ os << oat_header.GetInstructionSet() << "\n\n";
+
os << "DEX FILE COUNT:\n";
os << oat_header.GetDexFileCount() << "\n\n";