| 137 | } |
| 138 | |
| 139 | inline const void* CodeItemDataAccessor::CodeItemDataEnd() const { |
| 140 | const uint8_t* handler_data = GetCatchHandlerData(); |
| 141 | |
| 142 | if (TriesSize() == 0 || handler_data == nullptr) { |
| 143 | return &end().Inst(); |
| 144 | } |
| 145 | // Get the start of the handler data. |
| 146 | const uint32_t handlers_size = DecodeUnsignedLeb128(&handler_data); |
| 147 | // Manually read each handler. |
| 148 | for (uint32_t i = 0; i < handlers_size; ++i) { |
| 149 | int32_t uleb128_count = DecodeSignedLeb128(&handler_data) * 2; |
| 150 | if (uleb128_count <= 0) { |
| 151 | uleb128_count = -uleb128_count + 1; |
| 152 | } |
| 153 | for (int32_t j = 0; j < uleb128_count; ++j) { |
| 154 | DecodeUnsignedLeb128(&handler_data); |
| 155 | } |
| 156 | } |
| 157 | return reinterpret_cast<const void*>(handler_data); |
| 158 | } |
| 159 | |
| 160 | inline void CodeItemDebugInfoAccessor::Init(const DexFile& dex_file, |
| 161 | const DexFile::CodeItem* code_item, |
no test coverage detected