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

Side by Side Diff: snapshot/mac/module_snapshot_mac.h

Issue 997713002: Allow exception forwarding to the system’s native crash reporter to be disabled (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 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
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_MAC_MODULE_SNAPSHOT_MAC_H_ 15 #ifndef CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_
16 #define CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ 16 #define CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_
17 17
18 #include <stdint.h> 18 #include <stdint.h>
19 #include <sys/types.h> 19 #include <sys/types.h>
20 20
21 #include <map> 21 #include <map>
22 #include <string> 22 #include <string>
23 #include <vector> 23 #include <vector>
24 24
25 #include "base/basictypes.h" 25 #include "base/basictypes.h"
26 #include "client/crashpad_info.h"
26 #include "snapshot/mac/process_reader.h" 27 #include "snapshot/mac/process_reader.h"
27 #include "snapshot/module_snapshot.h" 28 #include "snapshot/module_snapshot.h"
28 #include "util/misc/initialization_state_dcheck.h" 29 #include "util/misc/initialization_state_dcheck.h"
29 30
30 namespace crashpad { 31 namespace crashpad {
31 32
32 class MachOImageReader; 33 class MachOImageReader;
33 struct UUID; 34 struct UUID;
34 35
35 namespace internal { 36 namespace internal {
(...skipping 10 matching lines...) Expand all
46 //! \param[in] process_reader A ProcessReader for the task containing the 47 //! \param[in] process_reader A ProcessReader for the task containing the
47 //! module. 48 //! module.
48 //! \param[in] process_reader_module The module within the ProcessReader for 49 //! \param[in] process_reader_module The module within the ProcessReader for
49 //! which the snapshot should be created. 50 //! which the snapshot should be created.
50 //! 51 //!
51 //! \return `true` if the snapshot could be created, `false` otherwise with 52 //! \return `true` if the snapshot could be created, `false` otherwise with
52 //! an appropriate message logged. 53 //! an appropriate message logged.
53 bool Initialize(ProcessReader* process_reader, 54 bool Initialize(ProcessReader* process_reader,
54 const ProcessReader::Module& process_reader_module); 55 const ProcessReader::Module& process_reader_module);
55 56
57 //! \brief Returns options from the module’s CrashpadInfo structure.
58 //!
59 //! \param[out] enable_crashpad_handler The value configured by
60 //! CrashpadInfo::SetCrashpadHandlerState(), or CrashpadInfo::kDefault
61 //! if there is no Crashpad client structure.
62 //! \param[out] enable_native_crash_reporter_forwarding The value configured
63 //! by CrashpadInfo::SetNativeCrashReporterForwarding(), or
64 //! CrashpadInfo::kDefault if there is no Crashpad client structure.
65 void GetCrashpadOptions(
66 CrashpadInfo::TriState* enable_crashpad_handler,
67 CrashpadInfo::TriState* enable_native_crash_reporter_forwarding);
68
56 // ModuleSnapshot: 69 // ModuleSnapshot:
57 70
58 std::string Name() const override; 71 std::string Name() const override;
59 uint64_t Address() const override; 72 uint64_t Address() const override;
60 uint64_t Size() const override; 73 uint64_t Size() const override;
61 time_t Timestamp() const override; 74 time_t Timestamp() const override;
62 void FileVersion(uint16_t* version_0, 75 void FileVersion(uint16_t* version_0,
63 uint16_t* version_1, 76 uint16_t* version_1,
64 uint16_t* version_2, 77 uint16_t* version_2,
65 uint16_t* version_3) const override; 78 uint16_t* version_3) const override;
(...skipping 13 matching lines...) Expand all
79 ProcessReader* process_reader_; // weak 92 ProcessReader* process_reader_; // weak
80 InitializationStateDcheck initialized_; 93 InitializationStateDcheck initialized_;
81 94
82 DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotMac); 95 DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotMac);
83 }; 96 };
84 97
85 } // namespace internal 98 } // namespace internal
86 } // namespace crashpad 99 } // namespace crashpad
87 100
88 #endif // CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ 101 #endif // CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698