summaryrefslogtreecommitdiff
path: root/oatdump/oatdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'oatdump/oatdump.cc')
-rw-r--r--oatdump/oatdump.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 77730b9255..96c8e94d9b 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -335,10 +335,14 @@ class OatDumper {
resolved_addr2instr_(0),
instruction_set_(oat_file_.GetOatHeader().GetInstructionSet()),
disassembler_(Disassembler::Create(instruction_set_,
- new DisassemblerOptions(options_.absolute_addresses_,
- oat_file.Begin(),
- oat_file.End(),
- true /* can_read_literals_ */))) {
+ new DisassemblerOptions(
+ options_.absolute_addresses_,
+ oat_file.Begin(),
+ oat_file.End(),
+ true /* can_read_literals_ */,
+ Is64BitInstructionSet(instruction_set_)
+ ? &Thread::DumpThreadOffset<PointerSize::k64>
+ : &Thread::DumpThreadOffset<PointerSize::k32>))) {
CHECK(options_.class_loader_ != nullptr);
CHECK(options_.class_filter_ != nullptr);
CHECK(options_.method_filter_ != nullptr);
@@ -1402,7 +1406,7 @@ class OatDumper {
const std::vector<const OatFile::OatDexFile*> oat_dex_files_;
const OatDumperOptions& options_;
uint32_t resolved_addr2instr_;
- InstructionSet instruction_set_;
+ const InstructionSet instruction_set_;
std::set<uintptr_t> offsets_;
Disassembler* disassembler_;
};