| OLD | NEW |
| 1 // Copyright (c) 2011 Google Inc. | 1 // Copyright (c) 2011 Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 Minidump minidump(templ); | 403 Minidump minidump(templ); |
| 404 ASSERT_TRUE(minidump.Read()); | 404 ASSERT_TRUE(minidump.Read()); |
| 405 | 405 |
| 406 // Check that the main module filename is correct. | 406 // Check that the main module filename is correct. |
| 407 MinidumpModuleList* module_list = minidump.GetModuleList(); | 407 MinidumpModuleList* module_list = minidump.GetModuleList(); |
| 408 ASSERT_TRUE(module_list); | 408 ASSERT_TRUE(module_list); |
| 409 const MinidumpModule* module = module_list->GetMainModule(); | 409 const MinidumpModule* module = module_list->GetMainModule(); |
| 410 EXPECT_STREQ(binpath.c_str(), module->code_file().c_str()); | 410 EXPECT_STREQ(binpath.c_str(), module->code_file().c_str()); |
| 411 // Check that the file ID is correct. | 411 // Check that the file ID is correct. |
| 412 FileID fileid(helper_path.c_str()); | 412 FileID fileid(helper_path.c_str()); |
| 413 uint8_t identifier[sizeof(MDGUID)]; | 413 uint8_t identifier[kMaxBuildID]; |
| 414 EXPECT_TRUE(fileid.ElfFileIdentifier(identifier)); | 414 size_t identifier_length; |
| 415 EXPECT_TRUE(fileid.ElfFileIdentifier(identifier, &identifier_length)); |
| 415 char identifier_string[kGUIDStringSize]; | 416 char identifier_string[kGUIDStringSize]; |
| 416 FileID::ConvertIdentifierToString(identifier, | 417 FileID::ConvertIdentifierToString(identifier, |
| 417 identifier_string, | 418 identifier_string, |
| 418 kGUIDStringSize); | 419 kGUIDStringSize); |
| 419 string module_identifier(identifier_string); | 420 string module_identifier(identifier_string); |
| 420 // Strip out dashes | 421 // Strip out dashes |
| 421 size_t pos; | 422 size_t pos; |
| 422 while ((pos = module_identifier.find('-')) != string::npos) { | 423 while ((pos = module_identifier.find('-')) != string::npos) { |
| 423 module_identifier.erase(pos, 1); | 424 module_identifier.erase(pos, 1); |
| 424 } | 425 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 kLimitBaseThreadCount) * kMinPerExtraThreadStackReduction; | 748 kLimitBaseThreadCount) * kMinPerExtraThreadStackReduction; |
| 748 EXPECT_LT(total_limit_stack_size, | 749 EXPECT_LT(total_limit_stack_size, |
| 749 total_normal_stack_size - min_expected_reduction); | 750 total_normal_stack_size - min_expected_reduction); |
| 750 } | 751 } |
| 751 | 752 |
| 752 // Kill the helper program. | 753 // Kill the helper program. |
| 753 kill(child_pid, SIGKILL); | 754 kill(child_pid, SIGKILL); |
| 754 } | 755 } |
| 755 | 756 |
| 756 } // namespace | 757 } // namespace |
| OLD | NEW |