• Home
  • Raw
  • Download

Lines Matching refs:dex_file

41 static void MakeDexVersion37(DexFile* dex_file) {  in MakeDexVersion37()  argument
43 CHECK_EQ(*(dex_file->Begin() + offset), '5'); in MakeDexVersion37()
44 *(const_cast<uint8_t*>(dex_file->Begin()) + offset) = '7'; in MakeDexVersion37()
47 static void FixUpChecksum(uint8_t* dex_file) { in FixUpChecksum() argument
48 DexFile::Header* header = reinterpret_cast<DexFile::Header*>(dex_file); in FixUpChecksum()
52 const uint8_t* non_sum_ptr = dex_file + non_sum; in FixUpChecksum()
71 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in VerifyModification() local
72 f(dex_file.get()); in VerifyModification()
73 FixUpChecksum(const_cast<uint8_t*>(dex_file->Begin())); in VerifyModification()
77 bool success = DexFileVerifier::Verify(dex_file.get(), in VerifyModification()
78 dex_file->Begin(), in VerifyModification()
79 dex_file->Size(), in VerifyModification()
117 std::unique_ptr<const DexFile> dex_file = std::move(tmp[0]); in OpenDexFileBase64() local
118 return dex_file; in OpenDexFileBase64()
155 [](DexFile* dex_file) { in TEST_F() argument
156 dex::MethodId* method_id = const_cast<dex::MethodId*>(&dex_file->GetMethodId(0)); in TEST_F()
165 [](DexFile* dex_file) { in TEST_F() argument
166 dex::MethodId* method_id = const_cast<dex::MethodId*>(&dex_file->GetMethodId(0)); in TEST_F()
175 [](DexFile* dex_file) { in TEST_F() argument
176 dex::MethodId* method_id = const_cast<dex::MethodId*>(&dex_file->GetMethodId(0)); in TEST_F()
239 static const uint8_t* FindMethodData(const DexFile* dex_file, in FindMethodData() argument
242 ClassAccessor accessor(*dex_file, dex_file->GetClassDef(0)); in FindMethodData()
246 dex::StringIndex name_index = dex_file->GetMethodId(method_index).name_idx_; in FindMethodData()
247 const dex::StringId& string_id = dex_file->GetStringId(name_index); in FindMethodData()
248 const char* str = dex_file->GetStringData(string_id); in FindMethodData()
264 static void SetMethodFlags(DexFile* dex_file, const char* method, uint32_t mask) { in SetMethodFlags() argument
265 uint8_t* method_flags_ptr = const_cast<uint8_t*>(FindMethodData(dex_file, method)); in SetMethodFlags()
281 static uint32_t GetMethodFlags(DexFile* dex_file, const char* method) { in GetMethodFlags() argument
282 const uint8_t* method_flags_ptr = const_cast<uint8_t*>(FindMethodData(dex_file, method)); in GetMethodFlags()
288 static void ApplyMaskToMethodFlags(DexFile* dex_file, const char* method, uint32_t mask) { in ApplyMaskToMethodFlags() argument
289 uint32_t value = GetMethodFlags(dex_file, method); in ApplyMaskToMethodFlags()
291 SetMethodFlags(dex_file, method, value); in ApplyMaskToMethodFlags()
295 static void OrMaskToMethodFlags(DexFile* dex_file, const char* method, uint32_t mask) { in OrMaskToMethodFlags() argument
296 uint32_t value = GetMethodFlags(dex_file, method); in OrMaskToMethodFlags()
298 SetMethodFlags(dex_file, method, value); in OrMaskToMethodFlags()
302 static void RemoveCode(DexFile* dex_file, const char* method) { in RemoveCode() argument
303 const uint8_t* ptr = FindMethodData(dex_file, method); in RemoveCode()
324 [](DexFile* dex_file) { in TEST_F() argument
325 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
326 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
336 [](DexFile* dex_file) { in TEST_F() argument
337 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
338 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
340 ApplyMaskToMethodFlags(dex_file, "<init>", ~kAccConstructor); in TEST_F()
341 ApplyMaskToMethodFlags(dex_file, "<clinit>", ~kAccConstructor); in TEST_F()
351 [&](DexFile* dex_file) { in TEST_F() argument
352 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
353 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
355 OrMaskToMethodFlags(dex_file, kConstructors[i], kAccNative); in TEST_F()
362 [&](DexFile* dex_file) { in TEST_F() argument
363 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
364 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
366 OrMaskToMethodFlags(dex_file, kConstructors[i], kAccAbstract); in TEST_F()
373 [&](DexFile* dex_file) { in TEST_F() argument
374 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
375 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
377 RemoveCode(dex_file, kConstructors[i]); in TEST_F()
384 [&](DexFile* dex_file) { in TEST_F() argument
385 MakeDexVersion37(dex_file); in TEST_F()
386 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
387 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
389 OrMaskToMethodFlags(dex_file, kConstructors[i], kAccNative); in TEST_F()
390 RemoveCode(dex_file, kConstructors[i]); in TEST_F()
397 [&](DexFile* dex_file) { in TEST_F() argument
398 MakeDexVersion37(dex_file); in TEST_F()
399 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
400 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
402 OrMaskToMethodFlags(dex_file, kConstructors[i], kAccAbstract); in TEST_F()
403 RemoveCode(dex_file, kConstructors[i]); in TEST_F()
422 [&](DexFile* dex_file) { in TEST_F() argument
423 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
424 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
426 ApplyMaskToMethodFlags(dex_file, "<init>", ~kAccPublic); in TEST_F()
427 OrMaskToMethodFlags(dex_file, "<init>", kInitAllowed[i]); in TEST_F()
443 [&](DexFile* dex_file) { in TEST_F() argument
444 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
445 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
447 ApplyMaskToMethodFlags(dex_file, "<init>", ~kAccPublic); in TEST_F()
448 OrMaskToMethodFlags(dex_file, "<init>", mask); in TEST_F()
458 [&](DexFile* dex_file) { in TEST_F() argument
459 MakeDexVersion37(dex_file); in TEST_F()
460 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
461 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
463 ApplyMaskToMethodFlags(dex_file, "<init>", ~kAccPublic); in TEST_F()
464 OrMaskToMethodFlags(dex_file, "<init>", kAccStatic); in TEST_F()
476 [&](DexFile* dex_file) { in TEST_F() argument
477 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
478 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
480 ApplyMaskToMethodFlags(dex_file, "<init>", ~kAccPublic); in TEST_F()
481 OrMaskToMethodFlags(dex_file, "<init>", kInitNotAllowed[i]); in TEST_F()
494 [&](DexFile* dex_file) { in TEST_F() argument
495 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
496 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
498 OrMaskToMethodFlags(dex_file, kMethods[i], kAccConstructor); in TEST_F()
505 [&](DexFile* dex_file) { in TEST_F() argument
506 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
507 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
509 OrMaskToMethodFlags(dex_file, kMethods[i], kAccNative); in TEST_F()
516 [&](DexFile* dex_file) { in TEST_F() argument
517 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
518 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
520 OrMaskToMethodFlags(dex_file, kMethods[i], kAccAbstract); in TEST_F()
527 [&](DexFile* dex_file) { in TEST_F() argument
528 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
529 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
531 RemoveCode(dex_file, kMethods[i]); in TEST_F()
548 [&](DexFile* dex_file) { in TEST_F() argument
549 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
550 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
552 RemoveCode(dex_file, kMethods[i]); in TEST_F()
556 if (((GetMethodFlags(dex_file, kMethods[i]) & kAccPublic) != 0) && in TEST_F()
559 OrMaskToMethodFlags(dex_file, kMethods[i], kAccAbstract | kAccFinal); in TEST_F()
561 OrMaskToMethodFlags(dex_file, kMethods[i], kAccAbstract | kAbstractDisallowed[j]); in TEST_F()
579 [&](DexFile* dex_file) { in TEST_F() argument
580 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
581 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
583 ApplyMaskToMethodFlags(dex_file, kMethods[i], ~kAccPublic); in TEST_F()
584 OrMaskToMethodFlags(dex_file, kMethods[i], mask); in TEST_F()
612 [&](DexFile* dex_file) { in TEST_F() argument
613 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
614 ApplyMaskToMethodFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
616 OrMaskToMethodFlags(dex_file, kMethods[i], kIgnoredMask); in TEST_F()
628 [](DexFile* dex_file) { in TEST_F() argument
629 OrMaskToMethodFlags(dex_file, "foo", kAccPublic | kAccProtected); in TEST_F()
680 [](DexFile* dex_file) { in TEST_F() argument
681 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
687 [](DexFile* dex_file) { in TEST_F() argument
688 MakeDexVersion37(dex_file); in TEST_F()
689 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
696 [](DexFile* dex_file) { in TEST_F() argument
697 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
699 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
705 [](DexFile* dex_file) { in TEST_F() argument
706 MakeDexVersion37(dex_file); in TEST_F()
707 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
709 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
716 [](DexFile* dex_file) { in TEST_F() argument
717 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
719 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccAbstract); in TEST_F()
726 [](DexFile* dex_file) { in TEST_F() argument
727 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
729 OrMaskToMethodFlags(dex_file, "foo", kAccStatic); in TEST_F()
735 [](DexFile* dex_file) { in TEST_F() argument
736 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
738 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
739 OrMaskToMethodFlags(dex_file, "foo", kAccPrivate); in TEST_F()
746 [](DexFile* dex_file) { in TEST_F() argument
747 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
749 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
755 [](DexFile* dex_file) { in TEST_F() argument
756 MakeDexVersion37(dex_file); in TEST_F()
757 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
759 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
766 [](DexFile* dex_file) { in TEST_F() argument
767 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
769 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
770 OrMaskToMethodFlags(dex_file, "foo", kAccProtected); in TEST_F()
776 [](DexFile* dex_file) { in TEST_F() argument
777 MakeDexVersion37(dex_file); in TEST_F()
778 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
780 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
781 OrMaskToMethodFlags(dex_file, "foo", kAccProtected); in TEST_F()
813 [&](DexFile* dex_file) { in TEST_F() argument
814 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
819 ApplyMaskToMethodFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
821 OrMaskToMethodFlags(dex_file, "foo", mask); in TEST_F()
834 static const uint8_t* FindFieldData(const DexFile* dex_file, const char* name) { in FindFieldData() argument
835 ClassAccessor accessor(*dex_file, dex_file->GetClassDef(0)); in FindFieldData()
839 dex::StringIndex name_index = dex_file->GetFieldId(field_index).name_idx_; in FindFieldData()
840 const dex::StringId& string_id = dex_file->GetStringId(name_index); in FindFieldData()
841 const char* str = dex_file->GetStringData(string_id); in FindFieldData()
852 static void SetFieldFlags(DexFile* dex_file, const char* field, uint32_t mask) { in SetFieldFlags() argument
853 uint8_t* field_flags_ptr = const_cast<uint8_t*>(FindFieldData(dex_file, field)); in SetFieldFlags()
869 static uint32_t GetFieldFlags(DexFile* dex_file, const char* field) { in GetFieldFlags() argument
870 const uint8_t* field_flags_ptr = const_cast<uint8_t*>(FindFieldData(dex_file, field)); in GetFieldFlags()
876 static void ApplyMaskToFieldFlags(DexFile* dex_file, const char* field, uint32_t mask) { in ApplyMaskToFieldFlags() argument
877 uint32_t value = GetFieldFlags(dex_file, field); in ApplyMaskToFieldFlags()
879 SetFieldFlags(dex_file, field, value); in ApplyMaskToFieldFlags()
883 static void OrMaskToFieldFlags(DexFile* dex_file, const char* field, uint32_t mask) { in OrMaskToFieldFlags() argument
884 uint32_t value = GetFieldFlags(dex_file, field); in OrMaskToFieldFlags()
886 SetFieldFlags(dex_file, field, value); in OrMaskToFieldFlags()
912 [](DexFile* dex_file) { in TEST_F() argument
913 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
914 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
924 [](DexFile* dex_file) { in TEST_F() argument
925 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
926 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
928 OrMaskToFieldFlags(dex_file, "foo", kAccStatic); in TEST_F()
934 [](DexFile* dex_file) { in TEST_F() argument
935 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
936 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
938 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccStatic); in TEST_F()
950 [&](DexFile* dex_file) { in TEST_F() argument
951 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
952 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
954 ApplyMaskToFieldFlags(dex_file, kFields[i], ~kAccPublic); in TEST_F()
966 [&](DexFile* dex_file) { in TEST_F() argument
967 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
968 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
970 ApplyMaskToFieldFlags(dex_file, kFields[i], ~kAccPublic); in TEST_F()
972 OrMaskToFieldFlags(dex_file, kFields[i], mask); in TEST_F()
997 [&](DexFile* dex_file) { in TEST_F() argument
998 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
999 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
1001 OrMaskToFieldFlags(dex_file, kFields[i], kIgnoredMask); in TEST_F()
1013 [&](DexFile* dex_file) { in TEST_F() argument
1014 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1015 ApplyMaskToFieldFlags(dex_file, "bar", ~kAccDeclaredSynchronized); in TEST_F()
1017 OrMaskToFieldFlags(dex_file, kFields[i], kAccVolatile | kAccFinal); in TEST_F()
1044 [](DexFile* dex_file) { in TEST_F() argument
1045 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1051 [](DexFile* dex_file) { in TEST_F() argument
1052 MakeDexVersion37(dex_file); in TEST_F()
1053 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1060 [](DexFile* dex_file) { in TEST_F() argument
1061 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1063 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1069 [](DexFile* dex_file) { in TEST_F() argument
1070 MakeDexVersion37(dex_file); in TEST_F()
1071 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1073 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1080 [](DexFile* dex_file) { in TEST_F() argument
1081 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1083 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccFinal); in TEST_F()
1089 [](DexFile* dex_file) { in TEST_F() argument
1090 MakeDexVersion37(dex_file); in TEST_F()
1091 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1093 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccFinal); in TEST_F()
1100 [](DexFile* dex_file) { in TEST_F() argument
1101 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1103 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1104 OrMaskToFieldFlags(dex_file, "foo", kAccProtected); in TEST_F()
1110 [](DexFile* dex_file) { in TEST_F() argument
1111 MakeDexVersion37(dex_file); in TEST_F()
1112 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1114 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1115 OrMaskToFieldFlags(dex_file, "foo", kAccProtected); in TEST_F()
1122 [](DexFile* dex_file) { in TEST_F() argument
1123 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1125 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1126 OrMaskToFieldFlags(dex_file, "foo", kAccPrivate); in TEST_F()
1132 [](DexFile* dex_file) { in TEST_F() argument
1133 MakeDexVersion37(dex_file); in TEST_F()
1134 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1136 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1137 OrMaskToFieldFlags(dex_file, "foo", kAccPrivate); in TEST_F()
1144 [](DexFile* dex_file) { in TEST_F() argument
1145 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1147 OrMaskToFieldFlags(dex_file, "foo", kAccSynthetic); in TEST_F()
1173 [&](DexFile* dex_file) { in TEST_F() argument
1174 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1179 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1181 OrMaskToFieldFlags(dex_file, "foo", mask); in TEST_F()
1187 [&](DexFile* dex_file) { in TEST_F() argument
1188 MakeDexVersion37(dex_file); in TEST_F()
1189 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1194 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccPublic); in TEST_F()
1196 OrMaskToFieldFlags(dex_file, "foo", mask); in TEST_F()
1223 [](DexFile* dex_file) { in TEST_F() argument
1224 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1230 [](DexFile* dex_file) { in TEST_F() argument
1231 MakeDexVersion37(dex_file); in TEST_F()
1232 ApplyMaskToFieldFlags(dex_file, "foo", ~kAccDeclaredSynchronized); in TEST_F()
1300 [](DexFile* dex_file) { in TEST_F() argument
1301 *(const_cast<uint8_t*>(dex_file->Begin()) + 416) = 0x14U; in TEST_F()
1323 [&](DexFile* dex_file) { in TEST_F() argument
1325 reinterpret_cast<const DexFile::Header*>(dex_file->Begin())); in TEST_F()
1406 [i](DexFile* dex_file) { in TEST_F() argument
1408 const uint8_t* data = FindMethodData(dex_file, "foo", &method_idx); in TEST_F()
1411 CHECK_LT(method_idx + 1u, dex_file->NumMethodIds()); in TEST_F()
1412 CHECK_EQ(dex_file->GetMethodId(method_idx).name_idx_, in TEST_F()
1413 dex_file->GetMethodId(method_idx + 1).name_idx_); in TEST_F()
1414 CHECK_EQ(dex_file->GetMethodId(method_idx).proto_idx_.index_ + 1u, in TEST_F()
1415 dex_file->GetMethodId(method_idx + 1).proto_idx_.index_); in TEST_F()
1417 dex::ProtoIndex proto1_idx = dex_file->GetMethodId(method_idx).proto_idx_; in TEST_F()
1418 const dex::ProtoId& proto1 = dex_file->GetProtoId(proto1_idx); in TEST_F()
1420 const dex::ProtoId& proto2 = dex_file->GetProtoId(proto2_idx); in TEST_F()
1423 CHECK(!DexFileParameterIterator(*dex_file, proto1).HasNext()); in TEST_F()
1424 CHECK(DexFileParameterIterator(*dex_file, proto2).HasNext()); in TEST_F()
1462 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1487 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1519 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1542 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1570 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1606 [](DexFile* dex_file ATTRIBUTE_UNUSED) { /* empty */ }, in TEST_F()
1616 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1620 EXPECT_TRUE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1621 dex_file->Begin(), in TEST_F()
1622 dex_file->Size(), in TEST_F()
1626 EXPECT_TRUE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1627 dex_file->Begin(), in TEST_F()
1628 dex_file->Size(), in TEST_F()
1635 const_cast<uint8_t*>(dex_file->Begin())); in TEST_F()
1637 EXPECT_TRUE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1638 dex_file->Begin(), in TEST_F()
1639 dex_file->Size(), in TEST_F()
1643 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1644 dex_file->Begin(), in TEST_F()
1645 dex_file->Size(), in TEST_F()
1688 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1690 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1691 dex_file->Begin(), in TEST_F()
1692 dex_file->Size(), in TEST_F()
1732 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1734 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1735 dex_file->Begin(), in TEST_F()
1736 dex_file->Size(), in TEST_F()
1776 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1778 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1779 dex_file->Begin(), in TEST_F()
1780 dex_file->Size(), in TEST_F()
1820 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1822 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1823 dex_file->Begin(), in TEST_F()
1824 dex_file->Size(), in TEST_F()
1857 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
1859 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
1860 dex_file->Begin(), in TEST_F()
1861 dex_file->Size(), in TEST_F()
2060 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
2062 EXPECT_TRUE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
2063 dex_file->Begin(), in TEST_F()
2064 dex_file->Size(), in TEST_F()
2107 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
2109 EXPECT_FALSE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
2110 dex_file->Begin(), in TEST_F()
2111 dex_file->Size(), in TEST_F()
2163 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in TEST_F() local
2165 EXPECT_TRUE(DexFileVerifier::Verify(dex_file.get(), in TEST_F()
2166 dex_file->Begin(), in TEST_F()
2167 dex_file->Size(), in TEST_F()