OLD | NEW |
1 // Copyright (c) 2014 Google Inc. | 1 // Copyright (c) 2014 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 std::istringstream stream(contents); | 207 std::istringstream stream(contents); |
208 while (GetLine(&stream, &line)) { | 208 while (GetLine(&stream, &line)) { |
209 if (line.find(kGoogleBreakpadKey) == string::npos) { | 209 if (line.find(kGoogleBreakpadKey) == string::npos) { |
210 continue; | 210 continue; |
211 } | 211 } |
212 if (line.find(kMicrodumpBegin) != string::npos) { | 212 if (line.find(kMicrodumpBegin) != string::npos) { |
213 in_microdump = true; | 213 in_microdump = true; |
214 continue; | 214 continue; |
215 } | 215 } |
| 216 if (!in_microdump) { |
| 217 continue; |
| 218 } |
216 if (line.find(kMicrodumpEnd) != string::npos) { | 219 if (line.find(kMicrodumpEnd) != string::npos) { |
217 break; | 220 break; |
218 } | 221 } |
219 | 222 |
220 if (!in_microdump) { | |
221 continue; | |
222 } | |
223 | |
224 size_t pos; | 223 size_t pos; |
225 if ((pos = line.find(kOsKey)) != string::npos) { | 224 if ((pos = line.find(kOsKey)) != string::npos) { |
226 string os_str(line, pos + strlen(kOsKey)); | 225 string os_str(line, pos + strlen(kOsKey)); |
227 std::istringstream os_tokens(os_str); | 226 std::istringstream os_tokens(os_str); |
228 string os_id; | 227 string os_id; |
229 string num_cpus; | 228 string num_cpus; |
230 string os_version; | 229 string os_version; |
231 // This reflect the actual HW arch and might not match the arch emulated | 230 // This reflect the actual HW arch and might not match the arch emulated |
232 // for the execution (e.g., running a 32-bit binary on a 64-bit cpu). | 231 // for the execution (e.g., running a 32-bit binary on a 64-bit cpu). |
233 string hw_arch; | 232 string hw_arch; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 filename, // debug_file | 335 filename, // debug_file |
337 identifier, // debug_identifier | 336 identifier, // debug_identifier |
338 "")); // version | 337 "")); // version |
339 } | 338 } |
340 } | 339 } |
341 stack_region_->Init(stack_start, stack_content); | 340 stack_region_->Init(stack_start, stack_content); |
342 } | 341 } |
343 | 342 |
344 } // namespace google_breakpad | 343 } // namespace google_breakpad |
345 | 344 |
OLD | NEW |