Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: src/processor/microdump.cc

Issue 2060663002: Server-side workaround to handle overlapping modules. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Fix whitespace. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // 103 //
104 104
105 void MicrodumpModules::Add(const CodeModule* module) { 105 void MicrodumpModules::Add(const CodeModule* module) {
106 linked_ptr<const CodeModule> module_ptr(module); 106 linked_ptr<const CodeModule> module_ptr(module);
107 if (!map_.StoreRange(module->base_address(), module->size(), module_ptr)) { 107 if (!map_.StoreRange(module->base_address(), module->size(), module_ptr)) {
108 BPLOG(ERROR) << "Module " << module->code_file() << 108 BPLOG(ERROR) << "Module " << module->code_file() <<
109 " could not be stored"; 109 " could not be stored";
110 } 110 }
111 } 111 }
112 112
113 void MicrodumpModules::SetEnableModuleShrink(bool is_enabled) {
114 map_.SetEnableShrinkDown(is_enabled);
115 }
113 116
114 // 117 //
115 // MicrodumpContext 118 // MicrodumpContext
116 // 119 //
117 120
118 void MicrodumpContext::SetContextARM(MDRawContextARM* arm) { 121 void MicrodumpContext::SetContextARM(MDRawContextARM* arm) {
119 DumpContext::SetContextFlags(MD_CONTEXT_ARM); 122 DumpContext::SetContextFlags(MD_CONTEXT_ARM);
120 DumpContext::SetContextARM(arm); 123 DumpContext::SetContextARM(arm);
121 valid_ = true; 124 valid_ = true;
122 } 125 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 system_info_->cpu = arch; 258 system_info_->cpu = arch;
256 system_info_->cpu_count = HexStrToL<uint8_t>(num_cpus); 259 system_info_->cpu_count = HexStrToL<uint8_t>(num_cpus);
257 system_info_->os_version = os_version; 260 system_info_->os_version = os_version;
258 261
259 if (os_id == "L") { 262 if (os_id == "L") {
260 system_info_->os = "Linux"; 263 system_info_->os = "Linux";
261 system_info_->os_short = "linux"; 264 system_info_->os_short = "linux";
262 } else if (os_id == "A") { 265 } else if (os_id == "A") {
263 system_info_->os = "Android"; 266 system_info_->os = "Android";
264 system_info_->os_short = "android"; 267 system_info_->os_short = "android";
268 modules_->SetEnableModuleShrink(true);
265 } 269 }
266 270
267 // OS line also contains release and version for future use. 271 // OS line also contains release and version for future use.
268 } else if ((pos = line.find(kStackKey)) != string::npos) { 272 } else if ((pos = line.find(kStackKey)) != string::npos) {
269 if (line.find(kStackFirstLineKey) != string::npos) { 273 if (line.find(kStackFirstLineKey) != string::npos) {
270 // The first line of the stack (S 0 stack header) provides the value of 274 // The first line of the stack (S 0 stack header) provides the value of
271 // the stack pointer, the start address of the stack being dumped and 275 // the stack pointer, the start address of the stack being dumped and
272 // the length of the stack. We could use it in future to double check 276 // the length of the stack. We could use it in future to double check
273 // that we received all the stack as expected. 277 // that we received all the stack as expected.
274 continue; 278 continue;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 filename, // debug_file 376 filename, // debug_file
373 identifier, // debug_identifier 377 identifier, // debug_identifier
374 "")); // version 378 "")); // version
375 } 379 }
376 } 380 }
377 stack_region_->Init(stack_start, stack_content); 381 stack_region_->Init(stack_start, stack_content);
378 } 382 }
379 383
380 } // namespace google_breakpad 384 } // namespace google_breakpad
381 385
OLDNEW
« no previous file with comments | « src/processor/fast_source_line_resolver_unittest.cc ('k') | src/processor/microdump_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698