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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 context.tid = child; | 162 context.tid = child; |
163 | 163 |
164 AutoTempDir temp_dir; | 164 AutoTempDir temp_dir; |
165 string templ = temp_dir.path() + kMDWriterUnitTestFileName; | 165 string templ = temp_dir.path() + kMDWriterUnitTestFileName; |
166 | 166 |
167 // Add information about the mapped memory. | 167 // Add information about the mapped memory. |
168 MappingInfo info; | 168 MappingInfo info; |
169 info.start_addr = kMemoryAddress; | 169 info.start_addr = kMemoryAddress; |
170 info.size = memory_size; | 170 info.size = memory_size; |
171 info.offset = 0; | 171 info.offset = 0; |
| 172 info.exec = false; |
172 strcpy(info.name, kMemoryName); | 173 strcpy(info.name, kMemoryName); |
173 | 174 |
174 MappingList mappings; | 175 MappingList mappings; |
175 AppMemoryList memory_list; | 176 AppMemoryList memory_list; |
176 MappingEntry mapping; | 177 MappingEntry mapping; |
177 mapping.first = info; | 178 mapping.first = info; |
178 memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); | 179 memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); |
179 mappings.push_back(mapping); | 180 mappings.push_back(mapping); |
180 ASSERT_TRUE(WriteMinidump(templ.c_str(), child, &context, sizeof(context), | 181 ASSERT_TRUE(WriteMinidump(templ.c_str(), child, &context, sizeof(context), |
181 mappings, memory_list)); | 182 mappings, memory_list)); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 context.tid = 1; | 317 context.tid = 1; |
317 | 318 |
318 string dumpfile = temp_dir.path() + kMDWriterUnitTestFileName; | 319 string dumpfile = temp_dir.path() + kMDWriterUnitTestFileName; |
319 | 320 |
320 // Add information about the mapped memory. Report it as being larger than | 321 // Add information about the mapped memory. Report it as being larger than |
321 // it actually is. | 322 // it actually is. |
322 MappingInfo info; | 323 MappingInfo info; |
323 info.start_addr = kMemoryAddress - memory_size; | 324 info.start_addr = kMemoryAddress - memory_size; |
324 info.size = memory_size * 3; | 325 info.size = memory_size * 3; |
325 info.offset = 0; | 326 info.offset = 0; |
| 327 info.exec = false; |
326 strcpy(info.name, kMemoryName); | 328 strcpy(info.name, kMemoryName); |
327 | 329 |
328 MappingList mappings; | 330 MappingList mappings; |
329 AppMemoryList memory_list; | 331 AppMemoryList memory_list; |
330 MappingEntry mapping; | 332 MappingEntry mapping; |
331 mapping.first = info; | 333 mapping.first = info; |
332 memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); | 334 memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); |
333 mappings.push_back(mapping); | 335 mappings.push_back(mapping); |
334 ASSERT_TRUE(WriteMinidump(dumpfile.c_str(), child, &context, sizeof(context), | 336 ASSERT_TRUE(WriteMinidump(dumpfile.c_str(), child, &context, sizeof(context), |
335 mappings, memory_list)); | 337 mappings, memory_list)); |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 kLimitBaseThreadCount) * kMinPerExtraThreadStackReduction; | 766 kLimitBaseThreadCount) * kMinPerExtraThreadStackReduction; |
765 EXPECT_LT(total_limit_stack_size, | 767 EXPECT_LT(total_limit_stack_size, |
766 total_normal_stack_size - min_expected_reduction); | 768 total_normal_stack_size - min_expected_reduction); |
767 } | 769 } |
768 | 770 |
769 // Kill the helper program. | 771 // Kill the helper program. |
770 kill(child_pid, SIGKILL); | 772 kill(child_pid, SIGKILL); |
771 } | 773 } |
772 | 774 |
773 } // namespace | 775 } // namespace |
OLD | NEW |