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

Side by Side Diff: third_party/crashpad/crashpad/snapshot/thread_snapshot.h

Issue 1505213004: Copy Crashpad into the Chrome tree instead of importing it via DEPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments, update README.chromium Created 5 years 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
(Empty)
1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
17
18 #include <stdint.h>
19
20 #include <vector>
21
22 namespace crashpad {
23
24 struct CPUContext;
25 class MemorySnapshot;
26
27 //! \brief An abstract interface to a snapshot representing a thread
28 //! (lightweight process) present in a snapshot process.
29 class ThreadSnapshot {
30 public:
31 virtual ~ThreadSnapshot() {}
32
33 //! \brief Returns a CPUContext object corresponding to the thread’s CPU
34 //! context.
35 //!
36 //! The caller does not take ownership of this object, it is scoped to the
37 //! lifetime of the ThreadSnapshot object that it was obtained from.
38 virtual const CPUContext* Context() const = 0;
39
40 //! \brief Returns a MemorySnapshot object corresponding to the memory region
41 //! that contains the thread’s stack, or `nullptr` if no stack region is
42 //! available.
43 //!
44 //! The caller does not take ownership of this object, it is scoped to the
45 //! lifetime of the ThreadSnapshot object that it was obtained from.
46 virtual const MemorySnapshot* Stack() const = 0;
47
48 //! \brief Returns the thread’s identifier.
49 //!
50 //! %Thread identifiers are at least unique within a process, and may be
51 //! unique system-wide.
52 virtual uint64_t ThreadID() const = 0;
53
54 //! \brief Returns the thread’s suspend count.
55 //!
56 //! A suspend count of `0` denotes a schedulable (not suspended) thread.
57 virtual int SuspendCount() const = 0;
58
59 //! \brief Returns the thread’s priority.
60 //!
61 //! Threads with higher priorities will have higher priority values.
62 virtual int Priority() const = 0;
63
64 //! \brief Returns the base address of a region used to store thread-specific
65 //! data.
66 virtual uint64_t ThreadSpecificDataAddress() const = 0;
67
68 //! \brief Returns a vector of additional memory blocks that should be
69 //! included in a minidump.
70 //!
71 //! \return A vector of MemorySnapshot objects that will be included in the
72 //! crash dump. The caller does not take ownership of these objects, they
73 //! are scoped to the lifetime of the ThreadSnapshot object that they
74 //! were obtained from.
75 virtual std::vector<const MemorySnapshot*> ExtraMemory() const = 0;
76 };
77
78 } // namespace crashpad
79
80 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698