Home
last modified time | relevance | path

Searched refs:dex (Results 1 – 25 of 40) sorted by relevance

12

/tools/dexter/slicer/export/slicer/
Dwriter.h29 namespace dex {
35 explicit Section(dex::u2 mapEntryType) : map_entry_type_(mapEntryType) {} in Section()
41 void SetOffset(dex::u4 offset) { in SetOffset()
46 dex::u4 SectionOffset() const { in SectionOffset()
51 dex::u4 AbsoluteOffset(dex::u4 itemOffset) const { in AbsoluteOffset()
58 dex::u4 AddItem(dex::u4 alignment = 1) {
64 dex::u4 ItemsCount() const { return count_; } in ItemsCount()
66 dex::u2 MapEntryType() const { return map_entry_type_; } in MapEntryType()
69 dex::u4 offset_ = 0;
70 dex::u4 count_ = 0;
[all …]
Dreader.h28 namespace dex {
39 Reader(const dex::u1* image, size_t size);
48 const dex::Header* Header() const { return header_; } in Header()
49 const char* GetStringMUTF8(dex::u4 index) const;
50 slicer::ArrayView<const dex::ClassDef> ClassDefs() const;
51 slicer::ArrayView<const dex::StringId> StringIds() const;
52 slicer::ArrayView<const dex::TypeId> TypeIds() const;
53 slicer::ArrayView<const dex::FieldId> FieldIds() const;
54 slicer::ArrayView<const dex::MethodId> MethodIds() const;
55 slicer::ArrayView<const dex::ProtoId> ProtoIds() const;
[all …]
Dcode_ir.h49 constexpr dex::u4 kInvalidOffset = dex::u4(-1);
129 dex::s4 s4_value;
130 dex::u4 u4_value;
134 explicit Const32(dex::u4 value) { u.u4_value = value; } in Const32()
141 dex::s8 s8_value;
142 dex::u8 u8_value;
146 explicit Const64(dex::u8 value) { u.u8_value = value; } in Const64()
152 dex::u4 reg;
154 explicit VReg(dex::u4 reg) : reg(reg) {} in VReg()
160 dex::u4 base_reg;
[all …]
Dbytecode_encoder.h54 void FixupPackedSwitch(dex::u4 base_offset, dex::u4 payload_offset);
55 void FixupSparseSwitch(dex::u4 base_offset, dex::u4 payload_offset);
61 dex::u4 offset; // instruction to be fixed up
65 LabelFixup(dex::u4 offset, Label* label, bool short_fixup) : in LabelFixup()
74 dex::u4 offset_ = 0;
77 dex::u4 outs_count_ = 0;
81 std::map<dex::u4, const PackedSwitchPayload*> packed_switches_;
82 std::map<dex::u4, const SparseSwitchPayload*> sparse_switches_;
Dbuffer.h130 size_t PushULeb128(dex::u4 value) { in PushULeb128()
131 dex::u1 tmp[4]; in PushULeb128()
132 dex::u1* end = dex::WriteULeb128(tmp, value); in PushULeb128()
137 size_t PushSLeb128(dex::s4 value) { in PushSLeb128()
138 dex::u1 tmp[4]; in PushSLeb128()
139 dex::u1* end = dex::WriteSLeb128(tmp, value); in PushSLeb128()
155 const dex::u1* data() const { in data()
165 buff_ = static_cast<dex::u1*>(::realloc(buff_, capacity_)); in Expand()
172 dex::u1* buff_ = nullptr;
Ddex_ir.h121 dex::u4 index;
125 dex::u4 orig_index;
131 dex::u1 type;
166 const dex::u1* strData = data.ptr<dex::u1>(); in c_str()
167 dex::ReadULeb128(&strData); in c_str()
212 dex::u4 access_flags;
218 dex::u4 line_start;
229 dex::u2 registers;
230 dex::u2 ins_count;
231 dex::u2 outs_count;
[all …]
Dindex_map.h29 dex::u4 AllocateIndex() { in AllocateIndex()
38 void MarkUsedIndex(dex::u4 index) { in MarkUsedIndex()
48 dex::u4 alloc_pos_ = 0;
Ddebuginfo_encoder.h46 dex::u4 line_start_ = 0;
47 dex::u4 last_line_ = 0;
48 dex::u4 last_address_ = 0;
/tools/dexter/slicer/
Dbytecode_encoder.cc26 static dex::u2 Pack_Z_8(dex::u4 a) { in Pack_Z_8()
27 dex::u2 fa = (a & 0xff); in Pack_Z_8()
33 static dex::u2 Pack_8_8(dex::u4 a, dex::u4 b) { in Pack_8_8()
34 dex::u2 fa = (a & 0xff); in Pack_8_8()
36 dex::u2 fb = (b & 0xff); in Pack_8_8()
42 static dex::u2 Pack_4_4_8(dex::u4 a, dex::u4 b, dex::u4 c) { in Pack_4_4_8()
43 dex::u2 fa = (a & 0xf); in Pack_4_4_8()
45 dex::u2 fb = (b & 0xf); in Pack_4_4_8()
47 dex::u2 fc = (c & 0xff); in Pack_4_4_8()
53 static dex::u2 Pack_4_4_4_4(dex::u4 a, dex::u4 b, dex::u4 c, dex::u4 d) { in Pack_4_4_4_4()
[all …]
Dreader.cc27 namespace dex { namespace
29 Reader::Reader(const dex::u1* image, size_t size) : image_(image), size_(size) { in Reader()
31 header_ = ptr<dex::Header>(0); in Reader()
36 dex_ir_->magic = slicer::MemView(header_, sizeof(dex::Header::magic)); in Reader()
39 slicer::ArrayView<const dex::ClassDef> Reader::ClassDefs() const { in ClassDefs()
40 return section<dex::ClassDef>(header_->class_defs_off, in ClassDefs()
44 slicer::ArrayView<const dex::StringId> Reader::StringIds() const { in StringIds()
45 return section<dex::StringId>(header_->string_ids_off, in StringIds()
49 slicer::ArrayView<const dex::TypeId> Reader::TypeIds() const { in TypeIds()
50 return section<dex::TypeId>(header_->type_ids_off, in TypeIds()
[all …]
Dcode_ir.cc71 const dex::u1* ptr = in DissasembleTryBlocks()
72 ir_code->catch_handlers.ptr<dex::u1>() + tryBlock.handler_off; in DissasembleTryBlocks()
73 int catchCount = dex::ReadSLeb128(&ptr); in DissasembleTryBlocks()
79 dex::u4 type_index = dex::ReadULeb128(&ptr); in DissasembleTryBlocks()
84 dex::u4 address = dex::ReadULeb128(&ptr); in DissasembleTryBlocks()
96 dex::u4 address = dex::ReadULeb128(&ptr); in DissasembleTryBlocks()
115 dex::u4 address = 0; in DissasembleDebugInfo()
129 auto annotation = Alloc<DbgInfoAnnotation>(dex::DBG_SET_FILE); in DissasembleDebugInfo()
132 source_file, source_file ? source_file->orig_index : dex::kNoIndex)); in DissasembleDebugInfo()
138 auto annotation = Alloc<DbgInfoAnnotation>(dex::DBG_ADVANCE_LINE); in DissasembleDebugInfo()
[all …]
Dwriter.cc32 namespace dex { namespace
36 static dex::u4 OptIndex(const T* ir_node) { in OptIndex()
37 return ir_node != nullptr ? ir_node->index : dex::kNoIndex; in OptIndex()
41 static void WriteEncodedValueHeader(dex::u1 type, int arg, Section& data) { in WriteEncodedValueHeader()
42 assert((type & ~dex::kEncodedValueTypeMask) == 0); in WriteEncodedValueHeader()
44 dex::u1 header = dex::u1(type | (arg << dex::kEncodedValueArgShift)); in WriteEncodedValueHeader()
45 data.Push<dex::u1>(header); in WriteEncodedValueHeader()
50 static void WriteIntValue(dex::u1 type, T value, Section& data) { in WriteIntValue()
51 dex::u1 buff[sizeof(T)] = {}; in WriteIntValue()
52 dex::u1* dst = buff; in WriteIntValue()
[all …]
Ddebuginfo_encoder.cc35 dbginfo_.Push<dex::u1>(dex::DBG_ADVANCE_PC); in Visit()
42 case dex::DBG_ADVANCE_LINE: { in Visit()
57 int adj_opcode = delta - dex::DBG_LINE_BASE; in Visit()
59 if (adj_opcode < 0 || adj_opcode >= dex::DBG_LINE_RANGE) { in Visit()
60 dbginfo_.Push<dex::u1>(dex::DBG_ADVANCE_LINE); in Visit()
62 adj_opcode = -dex::DBG_LINE_BASE; in Visit()
64 assert(adj_opcode >= 0 && dex::DBG_FIRST_SPECIAL + adj_opcode < 256); in Visit()
65 dex::u1 special_opcode = dex::DBG_FIRST_SPECIAL + adj_opcode; in Visit()
66 dbginfo_.Push<dex::u1>(special_opcode); in Visit()
71 case dex::DBG_START_LOCAL: { in Visit()
[all …]
Dinstrumentation.cc35 dex::u4 src_reg, in BoxValue()
36 dex::u4 dst_reg) { in BoxValue()
83 boxing_invoke->opcode = dex::OP_INVOKE_STATIC_RANGE; in BoxValue()
89 move_result->opcode = dex::OP_MOVE_RESULT_OBJECT; in BoxValue()
119 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in Apply()
152 hook_invoke->opcode = dex::OP_INVOKE_STATIC_RANGE; in Apply()
166 bool is_static = (ir_method->access_flags & dex::kAccStatic) != 0; in InjectArrayParamsHook()
179 dex::u4 array_size_reg = *(reg_iterator); in InjectArrayParamsHook()
182 dex::u4 array_reg = *(++reg_iterator); in InjectArrayParamsHook()
184 dex::u4 boxing_reg = needsBoxingReg ? *(++reg_iterator) : 0; in InjectArrayParamsHook()
[all …]
Dcontrol_flow_graph.cc56 const auto flags = dex::GetFlagsFromOpcode(bytecode->opcode); in Visit()
59 dex::kBranch | in Visit()
60 dex::kSwitch | in Visit()
61 dex::kThrow | in Visit()
62 dex::kReturn; in Visit()
66 dex::kBranch | in Visit()
67 dex::kSwitch | in Visit()
68 dex::kReturn; in Visit()
69 terminate_block = bytecode->opcode == dex::OP_THROW || (flags & exit_instr_flags) != 0; in Visit()
Dtryblocks_encoder.cc26 const dex::u4 begin_offset = try_end->try_begin->offset; in Visit()
27 const dex::u4 end_offset = try_end->offset; in Visit()
32 dex::TryBlock try_block = {}; in Visit()
39 dex::s4 catch_count = try_end->handlers.size(); in Visit()
106 auto tries_ptr = tries_.ptr<const dex::TryBlock>(0); in Encode()
107 ir_code->try_blocks = slicer::ArrayView<const dex::TryBlock>(tries_ptr, tries_count); in Encode()
/tools/dexter/dexter/
Ddexter.cc127 static void PrintDexMap(const dex::Reader& reader) { in PrintDexMap()
130 const dex::MapList& dexMap = *reader.DexMapList(); in PrintDexMap()
131 for (dex::u4 i = 0; i < dexMap.size; ++i) { in PrintDexMap()
132 const dex::MapItem& section = dexMap.list[i]; in PrintDexMap()
135 case dex::kHeaderItem: in PrintDexMap()
138 case dex::kStringIdItem: in PrintDexMap()
141 case dex::kTypeIdItem: in PrintDexMap()
144 case dex::kProtoIdItem: in PrintDexMap()
147 case dex::kFieldIdItem: in PrintDexMap()
150 case dex::kMethodIdItem: in PrintDexMap()
[all …]
Dexperimental.cc73 dex::Opcode new_call_opcode = dex::OP_NOP; in StressWrapInvoke()
75 case dex::OP_INVOKE_VIRTUAL: in StressWrapInvoke()
76 new_call_opcode = dex::OP_INVOKE_STATIC; in StressWrapInvoke()
78 case dex::OP_INVOKE_VIRTUAL_RANGE: in StressWrapInvoke()
79 new_call_opcode = dex::OP_INVOKE_STATIC_RANGE; in StressWrapInvoke()
85 assert(new_call_opcode != dex::OP_NOP); in StressWrapInvoke()
150 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in StressEntryHook()
174 call->opcode = dex::OP_INVOKE_STATIC_RANGE; in StressEntryHook()
233 dex::Opcode move_result_opcode = dex::OP_NOP; in StressExitHook()
234 dex::u4 reg = 0; in StressExitHook()
[all …]
Ddissasembler.cc64 printf("\t%5u| %s", bytecode->offset, dex::GetOpcodeName(bytecode->opcode)); in Visit()
198 SLICER_CHECK(type->index != dex::kNoIndex); in Visit()
205 SLICER_CHECK(field->index != dex::kNoIndex); in Visit()
212 SLICER_CHECK(method->index != dex::kNoIndex); in Visit()
272 case dex::DBG_START_LOCAL: in Visit()
275 case dex::DBG_START_LOCAL_EXTENDED: in Visit()
278 case dex::DBG_END_LOCAL: in Visit()
281 case dex::DBG_RESTART_LOCAL: in Visit()
284 case dex::DBG_SET_PROLOGUE_END: in Visit()
287 case dex::DBG_SET_EPILOGUE_BEGIN: in Visit()
[all …]
/tools/dexter/testdata/expected/
Dlarge.am_stats2 .dex file statistics:
15 .dex IR statistics:
Dhello.stats2 .dex file statistics:
15 .dex IR statistics:
Dexit_hooks.stats2 .dex file statistics:
15 .dex IR statistics:
Dmin.stats2 .dex file statistics:
15 .dex IR statistics:
Dtry_catch.stats2 .dex file statistics:
15 .dex IR statistics:
Dhello.hello_stats2 .dex file statistics:
15 .dex IR statistics:

12