| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 namespace crashpad { | 71 namespace crashpad { |
| 72 | 72 |
| 73 ProcessReader::Thread::Thread() | 73 ProcessReader::Thread::Thread() |
| 74 : thread_context(), | 74 : thread_context(), |
| 75 float_context(), | 75 float_context(), |
| 76 debug_context(), | 76 debug_context(), |
| 77 id(0), | 77 id(0), |
| 78 stack_region_address(0), | 78 stack_region_address(0), |
| 79 stack_region_size(0), | 79 stack_region_size(0), |
| 80 thread_specific_data_address(0), | 80 thread_specific_data_address(0), |
| 81 port(MACH_PORT_NULL), | 81 port(THREAD_NULL), |
| 82 suspend_count(0), | 82 suspend_count(0), |
| 83 priority(0) { | 83 priority(0) { |
| 84 } | 84 } |
| 85 | 85 |
| 86 ProcessReader::Module::Module() : name(), reader(NULL), timestamp(0) { | 86 ProcessReader::Module::Module() : name(), reader(NULL), timestamp(0) { |
| 87 } | 87 } |
| 88 | 88 |
| 89 ProcessReader::Module::~Module() { | 89 ProcessReader::Module::~Module() { |
| 90 } | 90 } |
| 91 | 91 |
| 92 ProcessReader::ProcessReader() | 92 ProcessReader::ProcessReader() |
| 93 : kern_proc_info_(), | 93 : kern_proc_info_(), |
| 94 threads_(), | 94 threads_(), |
| 95 modules_(), | 95 modules_(), |
| 96 module_readers_(), | 96 module_readers_(), |
| 97 task_memory_(), | 97 task_memory_(), |
| 98 task_(MACH_PORT_NULL), | 98 task_(TASK_NULL), |
| 99 initialized_(), | 99 initialized_(), |
| 100 is_64_bit_(false), | 100 is_64_bit_(false), |
| 101 initialized_threads_(false), | 101 initialized_threads_(false), |
| 102 initialized_modules_(false) { | 102 initialized_modules_(false) { |
| 103 } | 103 } |
| 104 | 104 |
| 105 ProcessReader::~ProcessReader() { | 105 ProcessReader::~ProcessReader() { |
| 106 for (const Thread& thread : threads_) { | 106 for (const Thread& thread : threads_) { |
| 107 kern_return_t kr = mach_port_deallocate(mach_task_self(), thread.port); | 107 kern_return_t kr = mach_port_deallocate(mach_task_self(), thread.port); |
| 108 MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr) << "mach_port_deallocate"; | 108 MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr) << "mach_port_deallocate"; |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // The red zone would go lower into another region in memory, but no | 707 // The red zone would go lower into another region in memory, but no |
| 708 // region was found. Memory can only be captured to an address as low as | 708 // region was found. Memory can only be captured to an address as low as |
| 709 // the base address of the region already found. | 709 // the base address of the region already found. |
| 710 *start_address = *region_base; | 710 *start_address = *region_base; |
| 711 } | 711 } |
| 712 } | 712 } |
| 713 #endif | 713 #endif |
| 714 } | 714 } |
| 715 | 715 |
| 716 } // namespace crashpad | 716 } // namespace crashpad |
| OLD | NEW |