-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Crashpad wrapper under starboard
Issue: 365546355
- Loading branch information
Showing
23 changed files
with
535 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2021 The Cobalt Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# The common "starboard" target. Any target that depends on Starboard should | ||
# depend on this common target, and not any of the specific "starboard_platform" | ||
# targets. | ||
|
||
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) { | ||
static_library("crashpad_wrapper") { | ||
check_includes = false | ||
|
||
sources = [ | ||
"wrapper.cc", | ||
"wrapper.h", | ||
] | ||
|
||
deps = [ | ||
"//starboard/elf_loader:evergreen_info", | ||
"//third_party/crashpad/crashpad/client", | ||
] | ||
} | ||
} | ||
|
||
static_library("wrapper_stub") { | ||
sources = [ | ||
"wrapper_stub.cc", | ||
"wrapper.h", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2021 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef THIRD_PARTY_CRASHPAD_WRAPPER_ANNOTATIONS_H_ | ||
#define THIRD_PARTY_CRASHPAD_WRAPPER_ANNOTATIONS_H_ | ||
|
||
#define CRASHPAD_ANNOTATION_DEFAULT_LENGTH 64 | ||
#define USER_AGENT_STRING_MAX_SIZE 2048 | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
// Annotations that Evergreen will add to Crashpad for more detailed crash | ||
// reports. | ||
typedef struct CrashpadAnnotations { | ||
char product[CRASHPAD_ANNOTATION_DEFAULT_LENGTH]; | ||
char version[CRASHPAD_ANNOTATION_DEFAULT_LENGTH]; | ||
char user_agent_string[USER_AGENT_STRING_MAX_SIZE]; | ||
} CrashpadAnnotations; | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif | ||
|
||
#endif // THIRD_PARTY_CRASHPAD_WRAPPER_ANNOTATIONS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 The Cobalt Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//third_party/protobuf/proto_library.gni") | ||
|
||
proto_library("crashpad_annotations_proto") { | ||
sources = [ "crashpad_annotations.proto" ] | ||
generate_python = false | ||
} |
39 changes: 39 additions & 0 deletions
39
starboard/crashpad_wrapper/proto/crashpad_annotations.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2022 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
option optimize_for = LITE_RUNTIME; | ||
|
||
package crashpad.wrapper; | ||
|
||
// Annotations that can be shared between Cobalt and Crashpad handler processes. | ||
// Next id: 6 | ||
message CrashpadAnnotations { | ||
// The product name. | ||
string prod = 1; | ||
|
||
// The product version. | ||
string ver = 2; | ||
|
||
// The User-Agent string that identifies brand, model, etc. | ||
string user_agent_string = 3; | ||
|
||
// The device series identifier that is used for device authentication. | ||
string cert_scope = 5; | ||
|
||
// Annotations with keys that are unknown at compile time. | ||
map<string, string> runtime_annotations = 4; | ||
} | ||
|
Oops, something went wrong.