| OLD | NEW |
| 1 // Copyright (c) 2010, Google Inc. | 1 // Copyright (c) 2010, 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 reinterpret_cast<void*>(start_addr) == linux_gate_loc) { | 347 reinterpret_cast<void*>(start_addr) == linux_gate_loc) { |
| 348 name = kLinuxGateLibraryName; | 348 name = kLinuxGateLibraryName; |
| 349 offset = 0; | 349 offset = 0; |
| 350 } | 350 } |
| 351 // Merge adjacent mappings with the same name into one module, | 351 // Merge adjacent mappings with the same name into one module, |
| 352 // assuming they're a single library mapped by the dynamic linker | 352 // assuming they're a single library mapped by the dynamic linker |
| 353 if (name && !mappings_.empty()) { | 353 if (name && !mappings_.empty()) { |
| 354 MappingInfo* module = mappings_.back(); | 354 MappingInfo* module = mappings_.back(); |
| 355 if ((start_addr == module->start_addr + module->size) && | 355 if ((start_addr == module->start_addr + module->size) && |
| 356 (my_strlen(name) == my_strlen(module->name)) && | 356 (my_strlen(name) == my_strlen(module->name)) && |
| 357 (my_strncmp(name, module->name, my_strlen(name)) == 0)) { | 357 (my_strncmp(name, module->name, my_strlen(name)) == 0) && |
| 358 (exec == module->exec)) { |
| 358 module->size = end_addr - module->start_addr; | 359 module->size = end_addr - module->start_addr; |
| 359 line_reader->PopLine(line_len); | 360 line_reader->PopLine(line_len); |
| 360 continue; | 361 continue; |
| 361 } | 362 } |
| 362 } | 363 } |
| 363 // Also merge mappings that result from address ranges that the | 364 // Also merge mappings that result from address ranges that the |
| 364 // linker reserved but which a loaded library did not use. These | 365 // linker reserved but which a loaded library did not use. These |
| 365 // appear as an anonymous private mapping with no access flags set | 366 // appear as an anonymous private mapping with no access flags set |
| 366 // and which directly follow an executable mapping. | 367 // and which directly follow an executable mapping. |
| 367 if (!name && !mappings_.empty()) { | 368 if (!name && !mappings_.empty()) { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 exe_stat.st_dev == new_path_stat.st_dev && | 597 exe_stat.st_dev == new_path_stat.st_dev && |
| 597 exe_stat.st_ino == new_path_stat.st_ino) { | 598 exe_stat.st_ino == new_path_stat.st_ino) { |
| 598 return false; | 599 return false; |
| 599 } | 600 } |
| 600 | 601 |
| 601 my_memcpy(path, exe_link, NAME_MAX); | 602 my_memcpy(path, exe_link, NAME_MAX); |
| 602 return true; | 603 return true; |
| 603 } | 604 } |
| 604 | 605 |
| 605 } // namespace google_breakpad | 606 } // namespace google_breakpad |
| OLD | NEW |