/tools/dexter/slicer/export/slicer/ |
D | writer.h | 29 namespace dex { 35 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 …]
|
D | reader.h | 28 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 …]
|
D | bytecode_encoder.h | 54 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_;
|
D | buffer.h | 130 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;
|
D | dex_ir.h | 121 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 …]
|
D | index_map.h | 29 dex::u4 AllocateIndex() { in AllocateIndex() 38 void MarkUsedIndex(dex::u4 index) { in MarkUsedIndex() 48 dex::u4 alloc_pos_ = 0;
|
D | debuginfo_encoder.h | 46 dex::u4 line_start_ = 0; 47 dex::u4 last_line_ = 0; 48 dex::u4 last_address_ = 0;
|
/tools/dexter/slicer/ |
D | bytecode_encoder.cc | 26 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 …]
|
D | reader.cc | 27 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 …]
|
D | code_ir.cc | 71 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 …]
|
D | writer.cc | 32 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 …]
|
D | debuginfo_encoder.cc | 35 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 …]
|
D | instrumentation.cc | 28 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in Apply() 58 hook_invoke->opcode = dex::OP_INVOKE_STATIC_RANGE; in Apply() 104 dex::Opcode move_result_opcode = dex::OP_NOP; in Apply() 105 dex::u4 reg = 0; in Apply() 109 case dex::OP_RETURN_VOID: in Apply() 112 case dex::OP_RETURN: in Apply() 114 move_result_opcode = dex::OP_MOVE_RESULT; in Apply() 118 case dex::OP_RETURN_OBJECT: in Apply() 120 move_result_opcode = dex::OP_MOVE_RESULT_OBJECT; in Apply() 124 case dex::OP_RETURN_WIDE: in Apply() [all …]
|
D | control_flow_graph.cc | 56 const auto flags = dex::GetFlagsFromOpcode(bytecode->opcode); in Visit() 59 dex::kInstrCanBranch | in Visit() 60 dex::kInstrCanSwitch | in Visit() 61 dex::kInstrCanThrow | in Visit() 62 dex::kInstrCanReturn; in Visit() 66 dex::kInstrCanBranch | in Visit() 67 dex::kInstrCanSwitch | in Visit() 68 dex::kInstrCanReturn; in Visit() 69 terminate_block = bytecode->opcode == dex::OP_THROW || (flags & exit_instr_flags) != 0; in Visit()
|
D | tryblocks_encoder.cc | 26 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() 100 auto tries_ptr = tries_.ptr<const dex::TryBlock>(0); in Encode() 101 ir_code->try_blocks = slicer::ArrayView<const dex::TryBlock>(tries_ptr, tries_count); in Encode()
|
/tools/dexter/dexter/ |
D | dexter.cc | 127 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 …]
|
D | experimental.cc | 73 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 …]
|
D | dissasembler.cc | 64 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/ |
D | try_catch.stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | large.stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | exit_hooks.stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | hello.hello_stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | large.am_stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | hello.stats | 2 .dex file statistics: 15 .dex IR statistics:
|
D | hello_nodebug.stats | 2 .dex file statistics: 15 .dex IR statistics:
|