Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Side by Side Diff: syzygy/agent/common/stack_walker.h

Issue 2194383007: Port some more code to x64 (Closed) Base URL: git@github.com:google/syzygy.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698