Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 Google Inc. All Rights Reserved. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (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 | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 | |
| 15 #ifndef SYZYGY_AGENT_COMMON_STACK_WALKER_H_ | |
| 16 #define SYZYGY_AGENT_COMMON_STACK_WALKER_H_ | |
| 17 | |
| 18 #ifdef _WIN64 | |
| 19 #include "syzygy/common/asan_parameters.h" | |
| 20 | |
| 21 namespace agent { | |
| 22 namespace common { | |
| 23 | |
| 24 using StackId = ::common::AsanStackId; | |
| 25 | |
| 26 // Heuristically walks the current stack. Does not consider its own stack | |
| 27 // frame. Frames are expected to have a standard layout with the top of the | |
| 28 // frame being a saved frame pointer, and the bottom of a frame being a return | |
| 29 // address. | |
| 30 // @param bottom_frames_to_skip The number of frames to skip from the bottom | |
| 31 // of the stack. | |
| 32 // @param max_frame_count The maximum number of frames that can be written to | |
| 33 // @p frames. | |
| 34 // @param frames The array to be populated with the computed frames. | |
| 35 // @param absolute_stack_id Pointer to the stack ID that will be calculated as | |
| 36 // we are walking the stack. | |
| 37 // @returns the number of frames successfully walked and stored in @p frames. | |
| 38 size_t WalkStack(uint32_t bottom_frames_to_skip, | |
| 39 uint32_t max_frame_count, | |
| 40 void** frames, | |
| 41 StackId* absolute_stack_id); | |
|
chrisha
2016/08/03 17:40:06
This definition is identical to the 32 and 64 bit
| |
| 42 | |
| 43 } // namespace common | |
| 44 } // namespace agent | |
| 45 #else | |
| 46 #include "syzygy/agent/common/stack_walker_x86.h" | |
| 47 #endif // defined _WIN^$ | |
| 48 | |
| 49 #endif // SYZYGY_AGENT_COMMON_STACK_WALKER_H_ | |
| OLD | NEW |