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

Side by Side Diff: snapshot/thread_snapshot.h

Issue 689483003: snapshot: Make destructors of interface classes public and virtual (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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 | « snapshot/test/test_module_snapshot.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. 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 #ifndef CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ 15 #ifndef CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ 16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
17 17
18 #include <stdint.h> 18 #include <stdint.h>
19 19
20 namespace crashpad { 20 namespace crashpad {
21 21
22 struct CPUContext; 22 struct CPUContext;
23 class MemorySnapshot; 23 class MemorySnapshot;
24 24
25 //! \brief An abstract interface to a snapshot representing a thread 25 //! \brief An abstract interface to a snapshot representing a thread
26 //! (lightweight process) present in a snapshot process. 26 //! (lightweight process) present in a snapshot process.
27 class ThreadSnapshot { 27 class ThreadSnapshot {
28 public: 28 public:
29 virtual ~ThreadSnapshot() {}
30
29 //! \brief Returns a CPUContext object corresponding to the thread’s CPU 31 //! \brief Returns a CPUContext object corresponding to the thread’s CPU
30 //! context. 32 //! context.
31 //! 33 //!
32 //! The caller does not take ownership of this object, it is scoped to the 34 //! The caller does not take ownership of this object, it is scoped to the
33 //! lifetime of the ThreadSnapshot object that it was obtained from. 35 //! lifetime of the ThreadSnapshot object that it was obtained from.
34 virtual const CPUContext* Context() const = 0; 36 virtual const CPUContext* Context() const = 0;
35 37
36 //! \brief Returns a MemorySnapshot object corresponding to the memory region 38 //! \brief Returns a MemorySnapshot object corresponding to the memory region
37 //! that contains the thread’s stack. 39 //! that contains the thread’s stack.
38 //! 40 //!
(...skipping 13 matching lines...) Expand all
52 virtual int SuspendCount() const = 0; 54 virtual int SuspendCount() const = 0;
53 55
54 //! \brief Returns the thread’s priority. 56 //! \brief Returns the thread’s priority.
55 //! 57 //!
56 //! Threads with higher priorities will have higher priority values. 58 //! Threads with higher priorities will have higher priority values.
57 virtual int Priority() const = 0; 59 virtual int Priority() const = 0;
58 60
59 //! \brief Returns the base address of a region used to store thread-specific 61 //! \brief Returns the base address of a region used to store thread-specific
60 //! data. 62 //! data.
61 virtual uint64_t ThreadSpecificDataAddress() const = 0; 63 virtual uint64_t ThreadSpecificDataAddress() const = 0;
62
63 protected:
64 ~ThreadSnapshot() {}
65 }; 64 };
66 65
67 } // namespace crashpad 66 } // namespace crashpad
68 67
69 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ 68 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « snapshot/test/test_module_snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698