summaryrefslogtreecommitdiff
path: root/compiler/cfi_test.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-08-19 10:49:06 -0700
committer Andreas Gampe <agampe@google.com> 2016-08-19 16:46:56 -0700
commit372f3a374681ef11f003460e14249adb7bc8313d (patch)
treeb6d2bd95975a0ce1096dc2aa761f8e6b30e42b18 /compiler/cfi_test.h
parent9c07ab332b8ebbcb1586c311bfcb75e19b8a35b4 (diff)
ART: Add thread offset printing hook to disassembler
To prepare separation of disassembler from libart, add a function hook to the disassembler options for thread offset name printing. Bug: 15436106 Change-Id: I9e9b7e565ae923952c64026f675ac527b560f51b
Diffstat (limited to 'compiler/cfi_test.h')
-rw-r--r--compiler/cfi_test.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/cfi_test.h b/compiler/cfi_test.h
index f8b7460935..c754e5588c 100644
--- a/compiler/cfi_test.h
+++ b/compiler/cfi_test.h
@@ -22,11 +22,13 @@
#include <sstream>
#include "arch/instruction_set.h"
+#include "base/enums.h"
#include "debug/dwarf/dwarf_constants.h"
#include "debug/dwarf/dwarf_test.h"
#include "debug/dwarf/headers.h"
#include "disassembler/disassembler.h"
#include "gtest/gtest.h"
+#include "thread.h"
namespace art {
@@ -57,7 +59,13 @@ class CFITest : public dwarf::DwarfTest {
// Pretty-print assembly.
const uint8_t* asm_base = actual_asm.data();
const uint8_t* asm_end = asm_base + actual_asm.size();
- auto* opts = new DisassemblerOptions(false, asm_base, asm_end, true);
+ auto* opts = new DisassemblerOptions(false,
+ asm_base,
+ asm_end,
+ true,
+ is64bit
+ ? &Thread::DumpThreadOffset<PointerSize::k64>
+ : &Thread::DumpThreadOffset<PointerSize::k32>);
std::unique_ptr<Disassembler> disasm(Disassembler::Create(isa, opts));
std::stringstream stream;
const uint8_t* base = actual_asm.data() + (isa == kThumb2 ? 1 : 0);