Lines Matching defs:override
428 const T &code, TestOverrideFunction override,
444 bool success = override(identity_address,
473 TestOverrideFunction override = OverrideFunctionWithDetour;
475 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
476 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
477 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
478 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
483 TestOverrideFunction override = OverrideFunctionWithRedirectJump;
484 TestIdentityFunctionPatching(kIdentityCodeWithJump, override);
485 TestIdentityFunctionPatching(kIdentityCodeWithJumpBackwards, override,
491 TestOverrideFunction override = OverrideFunctionWithHotPatch;
493 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
497 TestOverrideFunction override = OverrideFunctionWithTrampoline;
499 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
500 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
503 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
504 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
508 TestOverrideFunction override = OverrideFunction;
510 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
511 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
512 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
515 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
516 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
517 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
518 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
521 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
522 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
523 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
524 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
527 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
528 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
529 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
530 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
536 TestOverrideFunction override,
543 bool success = override(identity_address,
550 success = override(identity_address,
604 TestOverrideFunction override,
609 bool result = override(
617 TestOverrideFunction override = OverrideFunction;
619 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override));
620 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override));
622 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override));
624 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override));
626 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override));
627 EXPECT_TRUE(TestFunctionPatching(kPatchableCode5, override));
629 EXPECT_TRUE(TestFunctionPatching(kLoadGlobalCode, override));
632 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override));
633 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override));
634 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override));
635 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override));
636 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override));
637 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override));
642 TestOverrideFunction override = OverrideFunctionWithDetour;
644 EXPECT_FALSE(TestFunctionPatching(kPatchableCode1, override));
645 EXPECT_FALSE(TestFunctionPatching(kPatchableCode2, override));
646 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override));
647 EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override));
648 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override));
649 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override));
650 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override));
651 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override));
652 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override));
653 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override));
657 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
658 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
659 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
660 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override, prefix));
661 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
662 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
663 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
664 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
665 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
666 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
671 TestOverrideFunction override = OverrideFunctionWithRedirectJump;
672 EXPECT_FALSE(TestFunctionPatching(kPatchableCode1, override));
673 EXPECT_FALSE(TestFunctionPatching(kPatchableCode2, override));
674 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override));
675 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override));
676 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override));
677 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override));
678 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override));
679 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override));
680 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override));
681 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override));
685 TestOverrideFunction override = OverrideFunctionWithHotPatch;
688 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
689 EXPECT_FALSE(TestFunctionPatching(kPatchableCode2, override, prefix));
690 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
691 EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override, prefix));
693 EXPECT_TRUE(TestFunctionPatching(kPatchableCode6, override, prefix));
694 EXPECT_TRUE(TestFunctionPatching(kPatchableCode7, override, prefix));
695 EXPECT_TRUE(TestFunctionPatching(kPatchableCode8, override, prefix));
697 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
698 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
699 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
700 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
701 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
702 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
706 TestOverrideFunction override = OverrideFunctionWithTrampoline;
709 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
710 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
712 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
713 EXPECT_TRUE(TestFunctionPatching(kPatchableCode9, override, prefix));
714 EXPECT_TRUE(TestFunctionPatching(kPatchableCode10, override, prefix));
715 EXPECT_TRUE(TestFunctionPatching(kPatchableCode11, override, prefix));
716 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode7, override, prefix));
717 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode8, override, prefix));
718 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode9, override, prefix));
720 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
721 EXPECT_TRUE(TestFunctionPatching(kPatchableCode12, override, prefix));
722 EXPECT_TRUE(TestFunctionPatching(kPatchableCode13, override, prefix));
724 EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override, prefix));
725 EXPECT_TRUE(TestFunctionPatching(kPatchableCode14, override, prefix));
727 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
728 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
729 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
730 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
731 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
732 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
736 TestOverrideFunction override = OverrideFunctionWithTrampoline;
765 EXPECT_FALSE(TestFunctionPatching(kUnsupportedCode1, override, prefix));
773 TestOverrideFunction override = OverrideFunction;
776 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
777 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
779 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
781 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
783 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override, prefix));
785 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
786 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
787 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
788 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
789 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
790 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));