OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 if (!process_reader_.GetProcessInfo().LoggingRangeIsFullyReadable( | 347 if (!process_reader_.GetProcessInfo().LoggingRangeIsFullyReadable( |
348 CheckedRange<WinVMAddress, WinVMSize>(address, size))) { | 348 CheckedRange<WinVMAddress, WinVMSize>(address, size))) { |
349 return; | 349 return; |
350 } | 350 } |
351 | 351 |
352 // If we have already added this exact range, don't add it again. This is | 352 // If we have already added this exact range, don't add it again. This is |
353 // useful for the LDR module lists which are a set of doubly-linked lists, all | 353 // useful for the LDR module lists which are a set of doubly-linked lists, all |
354 // pointing to the same module name strings. | 354 // pointing to the same module name strings. |
355 // TODO(scottmg): A more general version of this, handling overlapping, | 355 // TODO(scottmg): A more general version of this, handling overlapping, |
356 // contained, etc. https://code.google.com/p/crashpad/issues/detail?id=61. | 356 // contained, etc. https://crashpad.chromium.org/bug/61. |
357 for (const auto& memory_snapshot : *into) { | 357 for (const auto& memory_snapshot : *into) { |
358 if (memory_snapshot->Address() == address && | 358 if (memory_snapshot->Address() == address && |
359 memory_snapshot->Size() == size) { | 359 memory_snapshot->Size() == size) { |
360 return; | 360 return; |
361 } | 361 } |
362 } | 362 } |
363 | 363 |
364 internal::MemorySnapshotWin* memory_snapshot = | 364 internal::MemorySnapshotWin* memory_snapshot = |
365 new internal::MemorySnapshotWin(); | 365 new internal::MemorySnapshotWin(); |
366 memory_snapshot->Initialize(&process_reader_, address, size); | 366 memory_snapshot->Initialize(&process_reader_, address, size); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 // ProcessLocksList.Flink. | 511 // ProcessLocksList.Flink. |
512 current_address = | 512 current_address = |
513 critical_section_debug.ProcessLocksList.Flink - | 513 critical_section_debug.ProcessLocksList.Flink - |
514 offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG<Traits>, | 514 offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG<Traits>, |
515 ProcessLocksList); | 515 ProcessLocksList); |
516 } while (current_address != start_address_forward && | 516 } while (current_address != start_address_forward && |
517 current_address != kInvalid); | 517 current_address != kInvalid); |
518 } | 518 } |
519 | 519 |
520 } // namespace crashpad | 520 } // namespace crashpad |
OLD | NEW |