| Index: syzygy/agent/common/stack_walker.cc
|
| diff --git a/syzygy/agent/common/stack_walker_x86.cc b/syzygy/agent/common/stack_walker.cc
|
| similarity index 90%
|
| rename from syzygy/agent/common/stack_walker_x86.cc
|
| rename to syzygy/agent/common/stack_walker.cc
|
| index 2a63172ac70f359e72a512e79f3f793398b09541..fa7b2e755f33f11d3f7b425d8c816b943e768a4e 100644
|
| --- a/syzygy/agent/common/stack_walker_x86.cc
|
| +++ b/syzygy/agent/common/stack_walker.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2015 Google Inc. All Rights Reserved.
|
| +// 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.
|
| @@ -12,18 +12,21 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| -#include "syzygy/agent/common/stack_walker_x86.h"
|
| +#include "syzygy/agent/common/stack_walker.h"
|
|
|
| #include <windows.h>
|
| -#include <winnt.h>
|
|
|
| +#ifndef _WIN64
|
| #include "base/logging.h"
|
| #include "syzygy/agent/common/stack_capture.h"
|
| #include "syzygy/common/align.h"
|
| +#endif
|
|
|
| namespace agent {
|
| namespace common {
|
|
|
| +#ifndef _WIN64
|
| +
|
| namespace {
|
|
|
| static size_t kPointerSize = sizeof(void*);
|
| @@ -182,5 +185,19 @@ size_t WalkStackImpl(const void* current_ebp,
|
| return num_frames;
|
| }
|
|
|
| +#else
|
| +
|
| +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));
|
| +}
|
| +
|
| +#endif // !defined _WIN64
|
| +
|
| } // namespace common
|
| } // namespace agent
|
|
|