| 387 | }; |
| 388 | |
| 389 | NS_BF_DBG_END |
| 390 | |
| 391 | ////////////////////////////////////////////////////////////////////////// |
| 392 | |
| 393 | void DbgSubprogram::ToString(StringImpl& str, bool internalName) |
| 394 | { |
| 395 | if ((mInlineeInfo != NULL) && (mInlineeInfo->mInlineeId != 0)) |
| 396 | mCompileUnit->mDbgModule->FixupInlinee(this); |
| 397 | |
| 398 | PopulateSubprogram(); |
| 399 | |
| 400 | if (mCheckedKind == BfCheckedKind_Checked) |
| 401 | str += "[Checked] "; |
| 402 | else if (mCheckedKind == BfCheckedKind_Unchecked) |
| 403 | str += "[Unchecked] "; |
| 404 | |
| 405 | auto language = GetLanguage(); |
| 406 | if (mName == NULL) |
| 407 | { |
| 408 | if (mLinkName[0] == '<') |
| 409 | { |
| 410 | str += mLinkName; |
| 411 | return; |
| 412 | } |
| 413 | str = BfDemangler::Demangle(StringImpl::MakeRef(mLinkName), language); |
| 414 | // Strip off the params since we need to generate those ourselves |
| 415 | int parenPos = (int)str.IndexOf('('); |
| 416 | if (parenPos != -1) |
| 417 | str = str.Substring(0, parenPos); |
| 418 | } |
| 419 | else if ((mHasQualifiedName) && (!internalName)) |
| 420 | { |
| 421 | const char* cPtr = mName; |
| 422 | if (strncmp(cPtr, "_bf::", 5) == 0) |
| 423 | { |
| 424 | cPtr += 5; |
| 425 | for ( ; true; cPtr++) |
| 426 | { |
| 427 | char c = *cPtr; |
| 428 | if (c == 0) |
| 429 | break; |
| 430 | |
| 431 | if ((c == '_') && (cPtr[-1] == ':')) |
| 432 | { |
| 433 | if (strcmp(cPtr, "__BfCtor") == 0) |
| 434 | { |
| 435 | str += "this"; |
| 436 | break; |
| 437 | } |
| 438 | if (strcmp(cPtr, "__BfStaticCtor") == 0) |
| 439 | { |
| 440 | str += "this$static"; |
| 441 | break; |
| 442 | } |
| 443 | if (strcmp(cPtr, "__BfCtorClear") == 0) |
| 444 | { |
| 445 | str += "this$clear"; |
| 446 | break; |
no test coverage detected