| 376 | } |
| 377 | |
| 378 | DbgTypeMap::Entry* DbgTypeMap::Find(const char* name, DbgLanguage language) |
| 379 | { |
| 380 | if (language == DbgLanguage_BeefUnfixed) |
| 381 | { |
| 382 | std::string str = name; |
| 383 | name = str.c_str(); |
| 384 | |
| 385 | for (char* cPtr = (char*)name; true; cPtr++) |
| 386 | { |
| 387 | char c = *cPtr; |
| 388 | if (c == 0) |
| 389 | break; |
| 390 | |
| 391 | if (c == '*') |
| 392 | { |
| 393 | char* nameStart = NULL; |
| 394 | |
| 395 | // Find our way to the end and remove the star |
| 396 | int chevCount = 0; |
| 397 | for (char* cTestPtr = cPtr - 1; cTestPtr >= name; cTestPtr--) |
| 398 | { |
| 399 | char c = *cTestPtr; |
| 400 | if (c == 0) |
| 401 | break; |
| 402 | if (c == '<') |
| 403 | { |
| 404 | chevCount--; |
| 405 | if (chevCount < 0) |
| 406 | { |
| 407 | nameStart = cTestPtr + 1; |
| 408 | break; |
| 409 | } |
| 410 | } |
| 411 | else if (c == '>') |
| 412 | chevCount++; |
| 413 | else if (chevCount == 0) |
| 414 | { |
| 415 | if ((c == '&') || (c == '*')) |
| 416 | break; // Invalid |
| 417 | |
| 418 | if (cTestPtr == name) |
| 419 | { |
| 420 | nameStart = cTestPtr; |
| 421 | break; |
| 422 | } |
| 423 | |
| 424 | if ((c == ' ') || (c == ',')) |
| 425 | { |
| 426 | nameStart = cTestPtr + 1; |
| 427 | break; |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | if (nameStart != NULL) |
| 433 | { |
| 434 | if (strncmp(nameStart, "System.Array1", 13) == 0) |
| 435 | { |
no test coverage detected