ART: oatdump enhancements
New features list includes:
- Class filter option to limit classes search space
- Method filter is applied only against the method
name, instead of the entire signature. Can be
combined with class filter for maximum efficiency.
- Bulk dump of class and method names list only.
Can be combined with filters to limit results.
- Export embedded dex files from input oat files
to filesystem (symlinks not supported as utils
functions are utilized for os & fs operations).
- addr2instr option to locate the in-range method
implementation and limit disassemble dumps. Input
relative addr is added to oat executable offset to
calculate the search offset. If method has been
successfully located, code is dumped and program
aborts further analysis of the input file. Methods
located before the target address just print their
signature, although skip all disassemble and other
info. Calculated search offset is also printed as
part of the initial header info.
- Little-endian dex instructions bytecode is printed
in the same line before the instruction string.
Some minor re-orders have been also taken place for
more targeted results.
Change-Id: I3116ee3c99c258718f46faea8ea4295da6ae2bf7
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h
index af5d9d0..d3b9eb4 100644
--- a/runtime/dex_instruction.h
+++ b/runtime/dex_instruction.h
@@ -525,6 +525,10 @@
// Dump code_units worth of this instruction, padding to code_units for shorter instructions
std::string DumpHex(size_t code_units) const;
+ // Little-endian dump code_units worth of this instruction, padding to code_units for
+ // shorter instructions
+ std::string DumpHexLE(size_t instr_code_units) const;
+
uint16_t Fetch16(size_t offset) const {
const uint16_t* insns = reinterpret_cast<const uint16_t*>(this);
return insns[offset];