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

Side by Side Diff: snapshot/module_snapshot.h

Issue 649633004: Add ModuleSnapshotMac (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crashpad_info
Patch Set: Rebase onto master Created 6 years, 2 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 | « snapshot/mac/thread_snapshot_mac.h ('k') | snapshot/snapshot.gyp » ('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 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,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 //! \brief Returns the module’s type. 107 //! \brief Returns the module’s type.
108 virtual ModuleType GetModuleType() const = 0; 108 virtual ModuleType GetModuleType() const = 0;
109 109
110 //! \brief Returns the module’s UUID in the \a uuid parameter. 110 //! \brief Returns the module’s UUID in the \a uuid parameter.
111 //! 111 //!
112 //! A snapshot module’s UUID is taken directly from the module itself. If the 112 //! A snapshot module’s UUID is taken directly from the module itself. If the
113 //! module does not have a UUID, the \a uuid parameter will be zeroed out. 113 //! module does not have a UUID, the \a uuid parameter will be zeroed out.
114 virtual void UUID(crashpad::UUID* uuid) const = 0; 114 virtual void UUID(crashpad::UUID* uuid) const = 0;
115 115
116 //! \brief Returns diagnostic messages recorded in the module. 116 //! \brief Returns string annotations recorded in the module.
117 //! 117 //!
118 //! This method retrieves diagnostic messages recorded in a module. These 118 //! This method retrieves annotations recorded in a module. These annotations
119 //! messages are intended for diagnostic use, including crash analysis. A 119 //! are intended for diagnostic use, including crash analysis. A module may
120 //! module may contain multiple diagnostic messages. 120 //! contain multiple annotations, so they are returned in a vector.
121 //! 121 //!
122 //! For Mac OS X snapshots, the diagnostic messages are found by interpreting 122 //! For Mac OS X snapshots, these annotations are found by interpreting the
123 //! the module’s `__DATA, __crash_info` section as 123 //! module’s `__DATA, __crash_info` section as `crashreporter_annotations_t`.
124 //! `crashreporter_annotations_t`. System libraries using the crash reporter 124 //! System libraries using the crash reporter client interface may reference
125 //! client interface may reference diagnostic messages in this structure. 125 //! annotations in this structure. Additional annotations messages may be
126 //! Additional diagnostic messages may be found in other locations, which may 126 //! found in other locations, which may be module-specific. The dynamic linker
127 //! be module-specific. The dynamic linker (`dyld`) can provide a diagnostic 127 //! (`dyld`) can provide an annotation at its `_error_string` symbol.
128 //! message at its `_error_string` symbol. 128 //!
129 virtual std::vector<std::string> DiagnosticMessages() const = 0; 129 //! The annotations returned by this method do not duplicate those returned by
130 //! AnnotationsSimpleMap().
131 virtual std::vector<std::string> AnnotationsVector() const = 0;
130 132
131 //! \brief Returns simple annotations recorded in the module. 133 //! \brief Returns key-value string annotations recorded in the module.
132 //! 134 //!
133 //! This method retrieves simple annotations recorded in a module. These 135 //! This method retrieves annotations recorded in a module. These annotations
134 //! annotations are intended for diagnostic use, including crash analysis. 136 //! are intended for diagnostic use, including crash analysis. “Simple
135 //! Simple annotations are structured as a sequence of key-value pairs. These 137 //! annotations are structured as a sequence of key-value pairs, where all
136 //! are referred to in Chrome as “crash keys.” 138 //! keys and values are strings. These are referred to in Chrome as “crash
139 //! keys.”
137 //! 140 //!
138 //! For Mac OS X snapshots, simple annotations are found by interpreting 141 //! For Mac OS X snapshots, these annotations are found by interpreting the
139 //! the `__DATA, __crashpad_info` section as `CrashpadInfo`. Clients can use 142 //! `__DATA, __crashpad_info` section as `CrashpadInfo`. Clients can use the
140 //! the Crashpad client interface to store annotations in this structure. 143 //! Crashpad client interface to store annotations in this structure.
141 virtual std::map<std::string, std::string> SimpleAnnotations() const = 0; 144 //!
145 //! The annotations returned by this method do not duplicate those returned by
146 //! AnnotationsVector().
147 virtual std::map<std::string, std::string> AnnotationsSimpleMap() const = 0;
142 148
143 protected: 149 protected:
144 ~ModuleSnapshot() {} 150 ~ModuleSnapshot() {}
145 }; 151 };
146 152
147 } // namespace crashpad 153 } // namespace crashpad
148 154
149 #endif // CRASHPAD_SNAPSHOT_MODULE_SNAPSHOT_H_ 155 #endif // CRASHPAD_SNAPSHOT_MODULE_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « snapshot/mac/thread_snapshot_mac.h ('k') | snapshot/snapshot.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698