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

Side by Side Diff: client/crashpad_info.h

Issue 651283003: Add crashpad_info, MachOImageAnnotationsReader, and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
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 | « client/client.gyp ('k') | client/crashpad_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CLIENT_CRASHPAD_INFO_H_
16 #define CRASHPAD_CLIENT_CRASHPAD_INFO_H_
17
18 #include "base/basictypes.h"
19
20 #include <stdint.h>
21
22 #include "client/simple_string_dictionary.h"
23
24 namespace crashpad {
25
26 //! \brief A structure that can be used by a Crashpad-enabled program to
27 //! provide information to the Crashpad crash handler.
28 //!
29 //! It is possible for one CrashpadInfo structure to appear in each loaded code
30 //! module in a process, but from the perspective of the user of the client
31 //! interface, there is only one global CrashpadInfo structure, located in the
32 //! module that contains the client interface code.
33 struct CrashpadInfo {
34 public:
35 //! \brief Returns the global CrashpadInfo structure.
36 static CrashpadInfo* GetCrashpadInfo();
37
38 CrashpadInfo();
39
40 void set_simple_annotations(SimpleStringDictionary* simple_annotations) {
41 simple_annotations_ = simple_annotations;
42 }
43
44 static const uint32_t kSignature = 'CPad';
45
46 private:
47 // The compiler won’t necessarily see anyone using these fields, but it
48 // shouldn’t warn about that. These fields aren’t intended for use by the
49 // process they’re found in, they’re supposed to be read by the crash
50 // reporting process.
51 #pragma clang diagnostic push
52 #pragma clang diagnostic ignored "-Wunused-private-field"
53 // Fields present in version 1:
54 uint32_t signature_; // kSignature
55 uint32_t size_; // The size of the entire CrashpadInfo structure.
56 uint32_t version_; // kVersion
57 uint32_t padding_0_;
58 SimpleStringDictionary* simple_annotations_; // weak
59 #pragma clang diagnostic pop
60
61 DISALLOW_COPY_AND_ASSIGN(CrashpadInfo);
62 };
63
64 } // namespace crashpad
65
66 #endif // CRASHPAD_CLIENT_CRASHPAD_INFO_H_
OLDNEW
« no previous file with comments | « client/client.gyp ('k') | client/crashpad_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698