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

Side by Side Diff: syzygy/agent/common/stack_capture.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
1 // Copyright 2013 Google Inc. All Rights Reserved. 1 // Copyright 2013 Google Inc. 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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 // 14 //
15 // Declares a utility class for getting and storing quick and dirty stack 15 // Declares a utility class for getting and storing quick and dirty stack
16 // captures. 16 // captures.
17 17
18 #ifndef SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_ 18 #ifndef SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_
19 #define SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_ 19 #define SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_
20 20
21 #include <windows.h> 21 #include <windows.h>
22 22
23 #include "base/logging.h" 23 #include "base/logging.h"
24 #include "syzygy/agent/common/stack_walker_x86.h" 24 #include "syzygy/agent/common/stack_walker.h"
25 #include "syzygy/common/asan_parameters.h" 25 #include "syzygy/common/asan_parameters.h"
26 26
27 namespace agent { 27 namespace agent {
28 namespace common { 28 namespace common {
29 29
30 // A simple class for holding a stack trace capture. 30 // A simple class for holding a stack trace capture.
31 class StackCapture { 31 class StackCapture {
32 public: 32 public:
33 // From http://msdn.microsoft.com/en-us/library/bb204633.aspx, 33 // From http://msdn.microsoft.com/en-us/library/bb204633.aspx,
34 // The maximum number of frames which CaptureStackBackTrace can be asked 34 // The maximum number of frames which CaptureStackBackTrace can be asked
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 stack_id ^= stack_id >> 11; 234 stack_id ^= stack_id >> 11;
235 stack_id += stack_id << 15; 235 stack_id += stack_id << 15;
236 stack_id ^= num_frames; 236 stack_id ^= num_frames;
237 return stack_id; 237 return stack_id;
238 } 238 }
239 239
240 } // namespace common 240 } // namespace common
241 } // namespace agent 241 } // namespace agent
242 242
243 #endif // SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_ 243 #endif // SYZYGY_AGENT_COMMON_STACK_CAPTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698