MCPcopy Create free account
hub / github.com/beefytech/Beef / GetInlineMatchDepth

Method GetInlineMatchDepth

IDEHelper/Backend/BeModule.cpp:914–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914int BeDbgLoc::GetInlineMatchDepth(BeDbgLoc* other)
915{
916 int inlineDepth = GetInlineDepth();
917 int otherInlineDepth = other->GetInlineDepth();
918
919 int matchDepth = 0;
920 while (true)
921 {
922 if ((matchDepth >= inlineDepth) || (matchDepth >= otherInlineDepth))
923 break;
924 int inlineIdx = inlineDepth - matchDepth - 1;
925 int otherInlineIdx = otherInlineDepth - matchDepth - 1;
926 auto inlinedAt = GetInlinedAt(inlineIdx);
927 auto otherInlinedAt = other->GetInlinedAt(otherInlineIdx);
928 if (inlinedAt != otherInlinedAt)
929 break;
930 if ((otherInlineIdx == 0) || (inlineIdx == 0))
931 {
932 // At the current scope, make sure we're refererring to the same method...
933 auto funcScope = GetInlinedAt(inlineIdx - 1);
934 auto otherFuncScope = other->GetInlinedAt(otherInlineIdx - 1);
935
936 auto dbgFunc = funcScope->GetDbgFunc();
937 auto otherDbgFunc = otherFuncScope->GetDbgFunc();
938 if (dbgFunc != otherDbgFunc)
939 {
940 // Same invocation position but different method...
941 break;
942 }
943 }
944 matchDepth++;
945 }
946
947 /*int matchDepth = 0;
948 while (true)
949 {
950 if ((matchDepth >= inlineDepth) || (matchDepth >= otherInlineDepth))
951 break;
952 if (GetInlinedAt(inlineDepth - matchDepth - 1) != other->GetInlinedAt(otherInlineDepth - matchDepth - 1))
953 break;
954 matchDepth++;
955 }*/
956
957 return matchDepth;
958}
959
960void BeDbgFunction::HashContent(BeHashContext& hashCtx)
961{

Callers 1

DbgGenerateModuleInfoMethod · 0.80

Calls 3

GetInlinedAtMethod · 0.80
GetDbgFuncMethod · 0.80
GetInlineDepthMethod · 0.45

Tested by

no test coverage detected