OLD | NEW |
1 // Copyright 2016 The Crashpad Authors. All rights reserved. | 1 // Copyright 2016 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const CheckedRange<uint64_t, uint64_t>& range) = 0; | 64 const CheckedRange<uint64_t, uint64_t>& range) = 0; |
65 }; | 65 }; |
66 | 66 |
67 //! \brief For all registers that appear to be pointer-like in \a context, | 67 //! \brief For all registers that appear to be pointer-like in \a context, |
68 //! captures a small amount of memory near their pointed to location. | 68 //! captures a small amount of memory near their pointed to location. |
69 //! | 69 //! |
70 //! "Pointer-like" in this context means not too close to zero (signed or | 70 //! "Pointer-like" in this context means not too close to zero (signed or |
71 //! unsigned) so that there's a reasonable chance that the value is a pointer. | 71 //! unsigned) so that there's a reasonable chance that the value is a pointer. |
72 //! | 72 //! |
73 //! \param[in] context The context to inspect. | 73 //! \param[in] context The context to inspect. |
74 //! \param[in] process_reader A MemoryCaptureProcessReader to read from the | 74 //! \param[in] delegate A Delegate that handles reading from the target |
75 //! target process, and that handles adding new ranges. | 75 //! process and adding new ranges. |
76 static void PointedToByContext(const CPUContext& context, Delegate* delegate); | 76 static void PointedToByContext(const CPUContext& context, Delegate* delegate); |
77 | 77 |
78 //! \brief For all pointer-like values in a memory range of the target | 78 //! \brief For all pointer-like values in a memory range of the target |
79 //! process, | 79 //! process, |
80 //! captures a small amount of memory near the pointed to location. | 80 //! captures a small amount of memory near the pointed to location. |
81 //! | 81 //! |
82 //! \param[in] memory An existing MemorySnapshot of the range to search. The | 82 //! \param[in] memory An existing MemorySnapshot of the range to search. The |
83 //! base address and size must be pointer-aligned and an integral number | 83 //! base address and size must be pointer-aligned and an integral number |
84 //! of | 84 //! of |
85 //! pointers long. | 85 //! pointers long. |
86 //! \param[in] process_reader A MemoryCaptureProcessReader to read from the | 86 //! \param[in] delegate A Delegate that handles reading from the target |
87 //! target process, and that handles adding new ranges. | 87 //! process and adding new ranges. |
88 static void PointedToByMemoryRange(const MemorySnapshot& memory, | 88 static void PointedToByMemoryRange(const MemorySnapshot& memory, |
89 Delegate* delegate); | 89 Delegate* delegate); |
90 | 90 |
91 private: | 91 private: |
92 DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureMemory); | 92 DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureMemory); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace internal | 95 } // namespace internal |
96 } // namespace crashpad | 96 } // namespace crashpad |
97 | 97 |
98 #endif // CRASHPAD_SNAPSHOT_CAPTURE_MEMORY_H_ | 98 #endif // CRASHPAD_SNAPSHOT_CAPTURE_MEMORY_H_ |
OLD | NEW |