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

Side by Side Diff: syzygy/agent/common/stack_capture.cc

Issue 2194383007: Port some more code to x64 (Closed) Base URL: git@github.com:google/syzygy.git@master
Patch Set: Rename the stack_walker unittest and fix the x86-64 implementation of stack_walker 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
« no previous file with comments | « syzygy/agent/common/stack_capture.h ('k') | syzygy/agent/common/stack_walker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "syzygy/agent/common/stack_capture.h" 15 #include "syzygy/agent/common/stack_capture.h"
16 16
17 #include <algorithm> 17 #include <algorithm>
18 18
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "syzygy/agent/common/stack_walker_x86.h" 20 #include "syzygy/agent/common/stack_walker.h"
21 #include "syzygy/core/address_space.h" 21 #include "syzygy/core/address_space.h"
22 22
23 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx 23 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
24 extern "C" IMAGE_DOS_HEADER __ImageBase; 24 extern "C" IMAGE_DOS_HEADER __ImageBase;
25 25
26 namespace agent { 26 namespace agent {
27 namespace common { 27 namespace common {
28 28
29 // The number of bottom frames to skip per stack trace. 29 // The number of bottom frames to skip per stack trace.
30 size_t StackCapture::bottom_frames_to_skip_ = 30 size_t StackCapture::bottom_frames_to_skip_ =
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 relative_stack_id_ = FinalizeStackId(relative_stack_id_, num_frames_); 209 relative_stack_id_ = FinalizeStackId(relative_stack_id_, num_frames_);
210 210
211 // We could end up with the value 0, in which case we set it to something 211 // We could end up with the value 0, in which case we set it to something
212 // else, as 0 is considered uninitialized. 212 // else, as 0 is considered uninitialized.
213 if (!relative_stack_id_) 213 if (!relative_stack_id_)
214 relative_stack_id_ = ~relative_stack_id_; 214 relative_stack_id_ = ~relative_stack_id_;
215 } 215 }
216 216
217 } // namespace common 217 } // namespace common
218 } // namespace agent 218 } // namespace agent
OLDNEW
« no previous file with comments | « syzygy/agent/common/stack_capture.h ('k') | syzygy/agent/common/stack_walker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698