diff --git a/snapshot/crashpad_types/crashpad_info_reader.cc b/snapshot/crashpad_types/crashpad_info_reader.cc index e4c8b934..9d0c781f 100644 --- a/snapshot/crashpad_types/crashpad_info_reader.cc +++ b/snapshot/crashpad_types/crashpad_info_reader.cc @@ -20,10 +20,12 @@ #include "client/crashpad_info.h" #include "util/misc/as_underlying_type.h" -#if defined(OS_WINDOWS) +#if defined(OS_WIN) #include "util/win/traits.h" #elif defined(OS_LINUX) || defined(OS_ANDROID) #include "util/linux/traits.h" +#elif defined(OS_FUCHSIA) +#include "util/fuchsia/traits.h" #endif namespace crashpad { diff --git a/util/BUILD.gn b/util/BUILD.gn index 388bc145..bfd75361 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -544,6 +544,7 @@ static_library("util") { "fuchsia/koid_utilities.h", "fuchsia/scoped_task_suspend.cc", "fuchsia/scoped_task_suspend.h", + "fuchsia/traits.h", "misc/capture_context_fuchsia.S", "misc/paths_fuchsia.cc", "process/process_memory_fuchsia.cc", diff --git a/util/fuchsia/traits.h b/util/fuchsia/traits.h new file mode 100644 index 00000000..5cdedc16 --- /dev/null +++ b/util/fuchsia/traits.h @@ -0,0 +1,32 @@ +// Copyright 2020 The Crashpad 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 CRASHPAD_UTIL_FUCHSIA_TRAITS_H_ +#define CRASHPAD_UTIL_FUCHSIA_TRAITS_H_ + +#include + +namespace crashpad { + +struct Traits32 { + using Address = uint32_t; +}; + +struct Traits64 { + using Address = uint64_t; +}; + +} // namespace crashpad + +#endif // CRASHPAD_UTIL_FUCHSIA_TRAITS_H_