Index: syzygy/agent/common/stack_walker.cc |
diff --git a/syzygy/agent/common/stack_walker.cc b/syzygy/agent/common/stack_walker.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b399e3ccbf2f65b7b65ee9048c4121413b9a5b15 |
--- /dev/null |
+++ b/syzygy/agent/common/stack_walker.cc |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 Google Inc. All Rights Reserved. |
+// |
+// Licensed under the Apache License, Version 2.0 (the "License"); |
+// you may not use this file except in compliance with the License. |
+// You may obtain a copy of the License at |
+// |
+// http://www.apache.org/licenses/LICENSE-2.0 |
+// |
+// Unless required by applicable law or agreed to in writing, software |
+// distributed under the License is distributed on an "AS IS" BASIS, |
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
+// See the License for the specific language governing permissions and |
+// limitations under the License. |
+ |
+#include "syzygy/agent/common/stack_walker.h" |
+ |
+#include <windows.h> |
+ |
+namespace agent { |
+namespace common { |
+ |
+size_t __declspec(noinline) WalkStack(uint32_t bottom_frames_to_skip, |
+ uint32_t max_frame_count, |
+ void** frames, |
+ StackId* absolute_stack_id) { |
+ return CaptureStackBackTrace(bottom_frames_to_skip, |
+ max_frame_count, |
+ frames, |
+ reinterpret_cast<PDWORD>(absolute_stack_id)); |
+} |
chrisha
2016/08/03 17:40:06
Call this stack_walker_x64.cc?
|
+ |
+} // namespace common |
+} // namespace agent |