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

Side by Side Diff: client/crashpad_info.cc

Issue 1052813002: win: make CrashpadInfo retrievable (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: more fixes Created 5 years, 7 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 | « no previous file | handler/mac/crash_report_exception_handler.cc » ('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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Put the structure in __DATA,__crashpad_info where it can be easily found 65 // Put the structure in __DATA,__crashpad_info where it can be easily found
66 // without having to consult the symbol table. The “used” attribute prevents it 66 // without having to consult the symbol table. The “used” attribute prevents it
67 // from being dead-stripped. 67 // from being dead-stripped.
68 __attribute__((section(SEG_DATA ",__crashpad_info"), 68 __attribute__((section(SEG_DATA ",__crashpad_info"),
69 used, 69 used,
70 visibility("hidden"))) CrashpadInfo g_crashpad_info; 70 visibility("hidden"))) CrashpadInfo g_crashpad_info;
71 71
72 #elif defined(OS_WIN) 72 #elif defined(OS_WIN)
73 73
74 // TODO(scottmg): Tag in a way that makes it easy to locate on Windows. 74 // Put the struct in a section name CPADinfo where it can be found without the
75 CrashpadInfo g_crashpad_info; 75 // symbol table.
76 #pragma section("CPADinfo", read, write)
77 __declspec(allocate("CPADinfo")) CrashpadInfo g_crashpad_info;
76 78
77 #endif 79 #endif
78 80
79 // static 81 // static
80 CrashpadInfo* CrashpadInfo::GetCrashpadInfo() { 82 CrashpadInfo* CrashpadInfo::GetCrashpadInfo() {
81 return &g_crashpad_info; 83 return &g_crashpad_info;
82 } 84 }
83 85
84 CrashpadInfo::CrashpadInfo() 86 CrashpadInfo::CrashpadInfo()
85 : signature_(kSignature), 87 : signature_(kSignature),
86 size_(sizeof(*this)), 88 size_(sizeof(*this)),
87 version_(kCrashpadInfoVersion), 89 version_(kCrashpadInfoVersion),
88 crashpad_handler_behavior_(TriState::kUnset), 90 crashpad_handler_behavior_(TriState::kUnset),
89 system_crash_reporter_forwarding_(TriState::kUnset), 91 system_crash_reporter_forwarding_(TriState::kUnset),
90 padding_0_(0), 92 padding_0_(0),
91 simple_annotations_(nullptr) { 93 simple_annotations_(nullptr) {
92 } 94 }
93 95
94 const uint32_t CrashpadInfo::kSignature; 96 const uint32_t CrashpadInfo::kSignature;
95 97
96 } // namespace crashpad 98 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | handler/mac/crash_report_exception_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698