Merge master f191fff64dd3 into doc

This commit is contained in:
Mark Mentovai 2016-11-08 14:26:52 -05:00
commit 81cb9dc0cb
63 changed files with 351 additions and 227 deletions

View File

@ -44,11 +44,11 @@ class CrashpadClient {
//! \brief Starts a Crashpad handler process, performing any necessary //! \brief Starts a Crashpad handler process, performing any necessary
//! handshake to configure it. //! handshake to configure it.
//! //!
//! This method directs crashes to the Crashpad handler. On Mac OS X, this //! This method directs crashes to the Crashpad handler. On macOS, this is
//! is applicable to this process and all child processes. On Windows, child //! applicable to this process and all subsequent child processes. On Windows,
//! processes must also register by using SetHandlerIPCPipe(). //! child processes must also register by using SetHandlerIPCPipe().
//! //!
//! On Mac OS X, this method starts a Crashpad handler and obtains a Mach send //! On macOS, this method starts a Crashpad handler and obtains a Mach send
//! right corresponding to a receive right held by the handler process. The //! right corresponding to a receive right held by the handler process. The
//! handler process runs an exception server on this port. This method sets //! handler process runs an exception server on this port. This method sets
//! the tasks exception port for `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD` //! the tasks exception port for `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD`
@ -56,8 +56,8 @@ class CrashpadClient {
//! with behavior `EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES` and thread //! with behavior `EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES` and thread
//! state flavor `MACHINE_THREAD_STATE`. Exception ports are inherited, so a //! state flavor `MACHINE_THREAD_STATE`. Exception ports are inherited, so a
//! Crashpad handler started here will remain the handler for any child //! Crashpad handler started here will remain the handler for any child
//! processes created after StartHandler() is called. Child processes do not //! processes created after StartHandler() is called. These child processes do
//! need to call StartHandler() or be aware of Crashpad in any way. The //! not need to call StartHandler() or be aware of Crashpad in any way. The
//! Crashpad handler will receive crashes from child processes that have //! Crashpad handler will receive crashes from child processes that have
//! inherited it as their exception handler even after the process that called //! inherited it as their exception handler even after the process that called
//! StartHandler() exits. //! StartHandler() exits.
@ -109,7 +109,7 @@ class CrashpadClient {
//! \brief Sets the process crash handler to a Mach service registered with //! \brief Sets the process crash handler to a Mach service registered with
//! the bootstrap server. //! the bootstrap server.
//! //!
//! This method is only defined on OS X. //! This method is only defined on macOS.
//! //!
//! See StartHandler() for more detail on how the port and handler are //! See StartHandler() for more detail on how the port and handler are
//! configured. //! configured.
@ -122,7 +122,7 @@ class CrashpadClient {
//! \brief Sets the process crash handler to a Mach port. //! \brief Sets the process crash handler to a Mach port.
//! //!
//! This method is only defined on OS X. //! This method is only defined on macOS.
//! //!
//! See StartHandler() for more detail on how the port and handler are //! See StartHandler() for more detail on how the port and handler are
//! configured. //! configured.
@ -234,7 +234,7 @@ class CrashpadClient {
//! \brief Configures the process to direct its crashes to the default handler //! \brief Configures the process to direct its crashes to the default handler
//! for the operating system. //! for the operating system.
//! //!
//! On OS X, this sets the tasks exception port as in SetHandlerMachPort(), //! On macOS, this sets the tasks exception port as in SetHandlerMachPort(),
//! but the exception handler used is obtained from //! but the exception handler used is obtained from
//! SystemCrashReporterHandler(). If the systems crash reporter handler //! SystemCrashReporterHandler(). If the systems crash reporter handler
//! cannot be determined or set, the tasks exception ports for crash-type //! cannot be determined or set, the tasks exception ports for crash-type

View File

@ -164,9 +164,9 @@ struct CrashpadInfo {
//! \brief Adds a custom stream to the minidump. //! \brief Adds a custom stream to the minidump.
//! //!
//! The memory block referenced by \a data and \a size will added to the //! The memory block referenced by \a data and \a size will added to the
//! minidump as separate stream with type \stream_type. The memory referred to //! minidump as separate stream with type \a stream_type. The memory referred
//! by \a data and \a size is owned by the caller and must remain valid while //! to by \a data and \a size is owned by the caller and must remain valid
//! it is in effect for the CrashpadInfo object. //! while it is in effect for the CrashpadInfo object.
//! //!
//! Note that streams will appear in the minidump in the reverse order to //! Note that streams will appear in the minidump in the reverse order to
//! which they are added. //! which they are added.

View File

@ -111,7 +111,7 @@ class DatabaseSizePruneCondition final : public PruneCondition {
DISALLOW_COPY_AND_ASSIGN(DatabaseSizePruneCondition); DISALLOW_COPY_AND_ASSIGN(DatabaseSizePruneCondition);
}; };
//! \breif A PruneCondition that conjoins two other PruneConditions. //! \brief A PruneCondition that conjoins two other PruneConditions.
class BinaryPruneCondition final : public PruneCondition { class BinaryPruneCondition final : public PruneCondition {
public: public:
enum Operator { enum Operator {

View File

@ -72,11 +72,11 @@ using GetSegmentDataType =
extern "C" { extern "C" {
// These implementations look up their functions in libmacho at run time. If // These implementations look up their functions in libmacho at run time. If the
// the system libmacho provides these functions as it normally does on Mac OS X // system libmacho provides these functions as it normally does on OS X 10.7 and
// 10.7 and later, the systems versions are used directly. Otherwise, the // later, the systems versions are used directly. Otherwise, the versions in
// versions in third_party/apple_cctools are used, which are actually just // third_party/apple_cctools are used, which are actually just copies of the
// copies of the systems functions. // systems functions.
uint8_t* getsectiondata(const MachHeader* mhp, uint8_t* getsectiondata(const MachHeader* mhp,
const char* segname, const char* segname,

View File

@ -279,21 +279,21 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_SYSTEM_INFO {
//! component. //! component.
//! //!
//! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `6`. //! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `6`.
//! - For Mac OS X 10.9.2, this would be `10`. //! - For macOS 10.12.1, this would be `10`.
uint32_t MajorVersion; uint32_t MajorVersion;
//! \brief The systems operating system version numbers second (minor) //! \brief The systems operating system version numbers second (minor)
//! component. //! component.
//! //!
//! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `1`. //! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `1`.
//! - For Mac OS X 10.9.2, this would be `9`. //! - For macOS 10.12.1, this would be `12`.
uint32_t MinorVersion; uint32_t MinorVersion;
//! \brief The systems operating system version numbers third (build or //! \brief The systems operating system version numbers third (build or
//! patch) component. //! patch) component.
//! //!
//! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `7601`. //! - For Windows 7 (NT 6.1) SP1, version 6.1.7601, this would be `7601`.
//! - For Mac OS X 10.9.2, this would be `2`. //! - For macOS 10.12.1, this would be `1`.
uint32_t BuildNumber; uint32_t BuildNumber;
//! \brief The systems operating system family. This may be a \ref //! \brief The systems operating system family. This may be a \ref
@ -311,9 +311,9 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_SYSTEM_INFO {
//! - On Windows, this is the name of the installed operating system service //! - On Windows, this is the name of the installed operating system service
//! pack, such as “Service Pack 1”. If no service pack is installed, this //! pack, such as “Service Pack 1”. If no service pack is installed, this
//! field references an empty string. //! field references an empty string.
//! - On Mac OS X, this is the operating system build number from `sw_vers //! - On macOS, this is the operating system build number from `sw_vers
//! -buildVersion`. For Mac OS X 10.9.2 on most hardware types, this would //! -buildVersion`. For macOS 10.12.1 on most hardware types, this would
//! be `13C64`. //! be `16B2657`.
//! - On Linux and other Unix-like systems, this is the kernel version from //! - On Linux and other Unix-like systems, this is the kernel version from
//! `uname -srvm`, possibly with additional information appended. On //! `uname -srvm`, possibly with additional information appended. On
//! Android, the `ro.build.fingerprint` system property is appended. //! Android, the `ro.build.fingerprint` system property is appended.
@ -417,17 +417,17 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION {
//! \brief The top-level exception code identifying the exception, in //! \brief The top-level exception code identifying the exception, in
//! operating system-specific values. //! operating system-specific values.
//! //!
//! For Mac OS X minidumps, this will be an \ref EXC_x "EXC_*" exception type, //! For macOS minidumps, this will be an \ref EXC_x "EXC_*" exception type,
//! such as `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions //! such as `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions
//! processed as `EXC_CRASH` when generated from another preceding exception: //! processed as `EXC_CRASH` when generated from another preceding exception:
//! the original exception code will appear instead. The exception type as it //! the original exception code will appear instead. The exception type as it
//! was received will appear at index 0 of #ExceptionInformation. //! was received will appear at index 0 of #ExceptionInformation.
//! //!
//! For Windows minidumps, this will be an \ref EXCEPTION_x "EXCEPTION_*" //! For Windows minidumps, this will be an `EXCEPTION_*` exception type, such
//! exception type, such as `EXCEPTION_ACCESS_VIOLATION`. //! as `EXCEPTION_ACCESS_VIOLATION`.
//! //!
//! \note This field is named ExceptionCode, but what is known as the //! \note This field is named ExceptionCode, but what is known as the
//! “exception code” on Mac OS X/Mach is actually stored in the //! “exception code” on macOS/Mach is actually stored in the
//! #ExceptionFlags field of a minidump file. //! #ExceptionFlags field of a minidump file.
//! //!
//! \todo Document the possible values by OS. There may be OS-specific enums //! \todo Document the possible values by OS. There may be OS-specific enums
@ -437,16 +437,16 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION {
//! \brief Additional exception flags that further identify the exception, in //! \brief Additional exception flags that further identify the exception, in
//! operating system-specific values. //! operating system-specific values.
//! //!
//! For Mac OS X minidumps, this will be the value of the exception code at //! For macOS minidumps, this will be the value of the exception code at index
//! index 0 as received by a Mach exception handler, except: //! 0 as received by a Mach exception handler, except:
//! * For exception type `EXC_CRASH` generated from another preceding //! * For exception type `EXC_CRASH` generated from another preceding
//! exception, the original exception code will appear here, not the code //! exception, the original exception code will appear here, not the code
//! as received by the Mach exception handler. //! as received by the Mach exception handler.
//! * For exception types `EXC_RESOURCE` and `EXC_GUARD`, the high 32 bits of //! * For exception types `EXC_RESOURCE` and `EXC_GUARD`, the high 32 bits of
//! the code received by the Mach exception handler will appear here. //! the code received by the Mach exception handler will appear here.
//! //!
//! In all cases for Mac OS X minidumps, the code as it was received by the //! In all cases for macOS minidumps, the code as it was received by the Mach
//! Mach exception handler will appear at index 1 of #ExceptionInformation. //! exception handler will appear at index 1 of #ExceptionInformation.
//! //!
//! For Windows minidumps, this will either be `0` if the exception is //! For Windows minidumps, this will either be `0` if the exception is
//! continuable, or `EXCEPTION_NONCONTINUABLE` to indicate a noncontinuable //! continuable, or `EXCEPTION_NONCONTINUABLE` to indicate a noncontinuable
@ -475,12 +475,12 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_EXCEPTION {
//! \brief Additional information about the exception, specific to the //! \brief Additional information about the exception, specific to the
//! operating system and possibly the #ExceptionCode. //! operating system and possibly the #ExceptionCode.
//! //!
//! For Mac OS X minidumps, this will contain the exception type as received //! For macOS minidumps, this will contain the exception type as received by a
//! by a Mach exception handler and the values of the `codes[0]` and //! Mach exception handler and the values of the `codes[0]` and `codes[1]`
//! `codes[1]` (exception code and subcode) parameters supplied to the Mach //! (exception code and subcode) parameters supplied to the Mach exception
//! exception handler. Unlike #ExceptionCode and #ExceptionFlags, the values //! handler. Unlike #ExceptionCode and #ExceptionFlags, the values received by
//! received by a Mach exception handler are used directly here even for the //! a Mach exception handler are used directly here even for the `EXC_CRASH`,
//! `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD` exception types. //! `EXC_RESOURCE`, and `EXC_GUARD` exception types.
//! For Windows, these are additional arguments (if any) as provided to //! For Windows, these are additional arguments (if any) as provided to
//! `RaiseException()`. //! `RaiseException()`.
@ -982,8 +982,9 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_INFO {
//! \brief The memory protection when the region was initially allocated. This //! \brief The memory protection when the region was initially allocated. This
//! member can be one of the memory protection options (such as //! member can be one of the memory protection options (such as
//! \ref PAGE_x PAGE_EXECUTE, \ref PAGE_x PAGE_NOACCESS, etc.), along with //! \ref PAGE_x "PAGE_EXECUTE", \ref PAGE_x "PAGE_NOACCESS", etc.), along
//! \ref PAGE_x PAGE_GUARD or \ref PAGE_x PAGE_NOCACHE, as needed. //! with \ref PAGE_x "PAGE_GUARD" or \ref PAGE_x "PAGE_NOCACHE", as
//! needed.
uint32_t AllocationProtect; uint32_t AllocationProtect;
uint32_t __alignment1; uint32_t __alignment1;
@ -993,7 +994,8 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_INFO {
uint64_t RegionSize; uint64_t RegionSize;
//! \brief The state of the pages in the region. This can be one of //! \brief The state of the pages in the region. This can be one of
//! \ref MEM_x MEM_COMMIT, \ref MEM_x MEM_FREE, or \ref MEM_x MEM_RESERVE. //! \ref MEM_x "MEM_COMMIT", \ref MEM_x "MEM_FREE", or \ref MEM_x
//! "MEM_RESERVE".
uint32_t State; uint32_t State;
//! \brief The access protection of the pages in the region. This member is //! \brief The access protection of the pages in the region. This member is
@ -1001,7 +1003,7 @@ struct __attribute__((packed, aligned(4))) MINIDUMP_MEMORY_INFO {
uint32_t Protect; uint32_t Protect;
//! \brief The type of pages in the region. This can be one of \ref MEM_x //! \brief The type of pages in the region. This can be one of \ref MEM_x
//! MEM_IMAGE, \ref MEM_x MEM_MAPPED, or \ref MEM_x MEM_PRIVATE. //! "MEM_IMAGE", \ref MEM_x "MEM_MAPPED", or \ref MEM_x "MEM_PRIVATE".
uint32_t Type; uint32_t Type;
uint32_t __alignment2; uint32_t __alignment2;

View File

@ -28,7 +28,7 @@ To deploy:
$ version=$(git rev-parse --short=12 HEAD) $ version=$(git rev-parse --short=12 HEAD)
$ [[ -n "$(git status --porcelain)" ]] && version+=-dirty $ [[ -n "$(git status --porcelain)" ]] && version+=-dirty
$ goapp deploy -version "${version}" $ …/go_appengine/goapp deploy -version "${version}"
Note that app.yaml does not name a “version” to encourage you to use a git hash Note that app.yaml does not name a “version” to encourage you to use a git hash
as the version, as above. as the version, as above.

View File

@ -162,7 +162,7 @@ STRIP_FROM_PATH =
# using the -I flag. # using the -I flag.
STRIP_FROM_INC_PATH = . \ STRIP_FROM_INC_PATH = . \
compat/mac \ compat/non_mac \
compat/non_win compat/non_win
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
@ -716,7 +716,7 @@ CITE_BIB_FILES =
# messages are off. # messages are off.
# The default value is: NO. # The default value is: NO.
QUIET = NO QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are # The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
@ -732,7 +732,7 @@ WARNINGS = YES
# will automatically be disabled. # will automatically be disabled.
# The default value is: YES. # The default value is: YES.
WARN_IF_UNDOCUMENTED = YES WARN_IF_UNDOCUMENTED = NO
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters # potential errors in the documentation, such as not documenting some parameters
@ -826,7 +826,10 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = third_party EXCLUDE = compat/mac \
compat/non_cxx11_lib \
compat/win \
third_party
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded
@ -1126,7 +1129,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation. # list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = HTML_EXTRA_STYLESHEET = doc/support/crashpad_doxygen.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note # other source files which should be copied to the HTML output directory. Note

View File

@ -22,3 +22,13 @@
//! \namespace crashpad::test //! \namespace crashpad::test
//! \brief The testing namespace, for use in test code only. //! \brief The testing namespace, for use in test code only.
//! \mainpage Crashpad Interface Documentation
//!
//! Most generated interface documentation is reachable through <a
//! href="namespaces.html">Namespaces</a>, <a href="annotated.html">Classes</a>
//! (includes `struct`s, `union`s, and interfaces), or <a
//! href="files.html">Files</a> (includes macros).
//!
//! Additional documentation is available at the <a
//! href="https://crashpad.chromium.org/">Crashpad home page</a>.

View File

@ -0,0 +1,60 @@
/* Copyright 2016 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. */
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset=latin,cyrillic-ext,greek-ext,cyrillic,greek,vietnamese,latin-ext";
@import "https://fonts.googleapis.com/css?family=Source+Code+Pro";
body,
table,
div,
p,
dl,
.title,
.icon,
table.directory,
.navpath li.navelem a,
#projectname,
#projectbrief,
#projectnumber,
div.toc li,
div.toc h3,
#powerTip div,
.sm-dox a,
.sm-dox a:focus,
.sm-dox a:hover,
.sm-dox a:active {
font-family: 'Open Sans',
'Lucida Grande',
'Lucida Sans Unicode',
Helvetica,
Arial,
sans-serif;
}
code,
tt,
pre.fragment,
div.line,
.overload,
.params .paramdir,
.sm-dox a span.sub-arrow {
font-family: 'Source Code Pro',
Monaco,
'Lucida Console',
monospace;
}
.icon {
height: auto;
}

View File

@ -37,10 +37,5 @@ maybe_mkdir "${output_dir}/doxygen"
rsync -Ilr --delete --exclude .git "out/doc/doxygen/html/" \ rsync -Ilr --delete --exclude .git "out/doc/doxygen/html/" \
"${output_dir}/doxygen" "${output_dir}/doxygen"
# Remove old things that used to be present
rm -rf "${output_dir}/doc"
rm -rf "${output_dir}/man"
rm -f "${output_dir}/index.html"
# Ensure a favicon exists at the root since the browser will always request it. # Ensure a favicon exists at the root since the browser will always request it.
cp doc/favicon.ico "${output_dir}/" cp doc/favicon.ico "${output_dir}/"

View File

@ -209,7 +209,7 @@ enum MinidumpOS : uint32_t {
kMinidumpOSUnix = 0x8000, kMinidumpOSUnix = 0x8000,
//! \brief Mac OS X, Darwin for traditional systems. //! \brief macOS, Darwin for traditional systems.
kMinidumpOSMacOSX = 0x8101, kMinidumpOSMacOSX = 0x8101,
//! \brief iOS, Darwin for mobile devices. //! \brief iOS, Darwin for mobile devices.
@ -276,7 +276,7 @@ struct ALIGNAS(4) PACKED MinidumpSimpleStringDictionary {
//! #version, so that newer parsers will be able to determine whether the added //! #version, so that newer parsers will be able to determine whether the added
//! fields are valid or not. //! fields are valid or not.
//! //!
//! \sa #MinidumpModuleCrashpadInfoList //! \sa MinidumpModuleCrashpadInfoList
struct ALIGNAS(4) PACKED MinidumpModuleCrashpadInfo { struct ALIGNAS(4) PACKED MinidumpModuleCrashpadInfo {
//! \brief The structures currently-defined version number. //! \brief The structures currently-defined version number.
//! //!
@ -423,7 +423,7 @@ struct ALIGNAS(4) PACKED MinidumpCrashpadInfo {
//! This field is present when #version is at least `1`. //! This field is present when #version is at least `1`.
MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; MINIDUMP_LOCATION_DESCRIPTOR simple_annotations;
//! \brief A pointer to a #MinidumpModuleCrashpadInfoList structure. //! \brief A pointer to a MinidumpModuleCrashpadInfoList structure.
//! //!
//! This field is present when #version is at least `1`. //! This field is present when #version is at least `1`.
MINIDUMP_LOCATION_DESCRIPTOR module_list; MINIDUMP_LOCATION_DESCRIPTOR module_list;

View File

@ -68,8 +68,8 @@ std::string BuildString(const SystemSnapshot* system_snapshot) {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// Converts the value of the MAC_OS_VERSION_MIN_REQUIRED or // Converts the value of the MAC_OS_VERSION_MIN_REQUIRED or
// MAC_OS_X_VERSION_MAX_ALLOWED macro from <AvailabilityMacros.h> to a number // MAC_OS_X_VERSION_MAX_ALLOWED macro from <AvailabilityMacros.h> to a number
// identifying the minor Mac OS X version that it represents. For example, with // identifying the minor macOS version that it represents. For example, with an
// an argument of MAC_OS_X_VERSION_10_6, this function will return 6. // argument of MAC_OS_X_VERSION_10_6, this function will return 6.
int AvailabilityVersionToMacOSXMinorVersion(int availability) { int AvailabilityVersionToMacOSXMinorVersion(int availability) {
// Through MAC_OS_X_VERSION_10_9, the minor version is the tens digit. // Through MAC_OS_X_VERSION_10_9, the minor version is the tens digit.
if (availability >= 1000 && availability <= 1099) { if (availability >= 1000 && availability <= 1099) {

View File

@ -125,11 +125,12 @@ class MinidumpModuleCrashpadInfoListWriter final
//! \brief Adds a MinidumpModuleCrashpadInfo to the //! \brief Adds a MinidumpModuleCrashpadInfo to the
//! MinidumpModuleCrashpadInfoList. //! MinidumpModuleCrashpadInfoList.
//! //!
//! \param[in] module Extended Crashpad-specific information about the module. //! \param[in] module_crashpad_info Extended Crashpad-specific information
//! This object takes ownership of \a module and becomes its parent in the //! about the module. This object takes ownership of \a
//! overall tree of internal::MinidumpWritable objects. //! module_crashpad_info and becomes its parent in the overall tree of
//! \param[in] module_list_index The index of the MINIDUMP_MODULE in the //! internal::MinidumpWritable objects.
//! minidump files MINIDUMP_MODULE_LIST stream that corresponds to \a //! \param[in] minidump_module_list_index The index of the MINIDUMP_MODULE in
//! the minidump files MINIDUMP_MODULE_LIST stream that corresponds to \a
//! module_crashpad_info. //! module_crashpad_info.
//! //!
//! \note Valid in #kStateMutable. //! \note Valid in #kStateMutable.

View File

@ -19,7 +19,6 @@ limitations under the License.
* [Home][home] * [Home][home]
* [Developing](/doc/developing.md) * [Developing](/doc/developing.md)
* [Interface Docs](https://crashpad.chromium.org/doxygen/) * [Interface Docs](https://crashpad.chromium.org/doxygen/)
* [Man Pages](https://crashpad.chromium.org/man/)
* [Man Pages](/doc/man.md) * [Man Pages](/doc/man.md)
* [Source Code](https://chromium.googlesource.com/crashpad/crashpad/) * [Source Code](https://chromium.googlesource.com/crashpad/crashpad/)

View File

@ -71,8 +71,8 @@ class CaptureMemory {
//! unsigned) so that there's a reasonable chance that the value is a pointer. //! unsigned) so that there's a reasonable chance that the value is a pointer.
//! //!
//! \param[in] context The context to inspect. //! \param[in] context The context to inspect.
//! \param[in] process_reader A MemoryCaptureProcessReader to read from the //! \param[in] delegate A Delegate that handles reading from the target
//! target process, and that handles adding new ranges. //! process and adding new ranges.
static void PointedToByContext(const CPUContext& context, Delegate* delegate); static void PointedToByContext(const CPUContext& context, Delegate* delegate);
//! \brief For all pointer-like values in a memory range of the target //! \brief For all pointer-like values in a memory range of the target
@ -83,8 +83,8 @@ class CaptureMemory {
//! base address and size must be pointer-aligned and an integral number //! base address and size must be pointer-aligned and an integral number
//! of //! of
//! pointers long. //! pointers long.
//! \param[in] process_reader A MemoryCaptureProcessReader to read from the //! \param[in] delegate A Delegate that handles reading from the target
//! target process, and that handles adding new ranges. //! process and adding new ranges.
static void PointedToByMemoryRange(const MemorySnapshot& memory, static void PointedToByMemoryRange(const MemorySnapshot& memory,
Delegate* delegate); Delegate* delegate);

View File

@ -133,7 +133,7 @@ struct CPUContextX86_64 {
uint16_t fop; // FPU opcode uint16_t fop; // FPU opcode
union { union {
// The expression of these union members is determined by the use of // The expression of these union members is determined by the use of
// fxsave/fxrstor or fxsave64/fxrstor64 (fxsaveq/fxrstorq). Mac OS X and // fxsave/fxrstor or fxsave64/fxrstor64 (fxsaveq/fxrstorq). macOS and
// Windows systems use the traditional fxsave/fxrstor structure. // Windows systems use the traditional fxsave/fxrstor structure.
struct { struct {
// fxsave/fxrstor // fxsave/fxrstor

View File

@ -50,21 +50,21 @@ class ExceptionSnapshot {
//! //!
//! This is an operating system-specific value. //! This is an operating system-specific value.
//! //!
//! For Mac OS X, this will be an \ref EXC_x "EXC_*" exception type, such as //! For macOS, this will be an \ref EXC_x "EXC_*" exception type, such as
//! `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions //! `EXC_BAD_ACCESS`. `EXC_CRASH` will not appear here for exceptions
//! processed as `EXC_CRASH` when generated from another preceding exception: //! processed as `EXC_CRASH` when generated from another preceding exception:
//! the original exception code will appear instead. The exception type as it //! the original exception code will appear instead. The exception type as it
//! was received will appear at index 0 of Codes(). //! was received will appear at index 0 of Codes().
//! //!
//! For Windows, this will be an \ref EXCEPTION_x "EXCEPTION_*" exception type //! For Windows, this will be an `EXCEPTION_*` exception type, such as
//! such as `EXCEPTION_ACCESS_VIOLATION`. //! `EXCEPTION_ACCESS_VIOLATION`.
virtual uint32_t Exception() const = 0; virtual uint32_t Exception() const = 0;
//! \brief Returns the second-level exception code identifying the exception. //! \brief Returns the second-level exception code identifying the exception.
//! //!
//! This is an operating system-specific value. //! This is an operating system-specific value.
//! //!
//! For Mac OS X, this will be the value of the exception code at index 0 as //! For macOS, this will be the value of the exception code at index 0 as
//! received by a Mach exception handler, except: //! received by a Mach exception handler, except:
//! * For `EXC_CRASH` exceptions generated from another preceding exception, //! * For `EXC_CRASH` exceptions generated from another preceding exception,
//! the original exception code will appear here, not the code as received //! the original exception code will appear here, not the code as received
@ -72,7 +72,7 @@ class ExceptionSnapshot {
//! * For `EXC_RESOURCE` and `EXC_GUARD` exceptions, the high 32 bits of the //! * For `EXC_RESOURCE` and `EXC_GUARD` exceptions, the high 32 bits of the
//! exception code at index 0 will appear here. //! exception code at index 0 will appear here.
//! //!
//! In all cases on Mac OS X, the full exception code at index 0 as it was //! In all cases on macOS, the full exception code at index 0 as it was
//! received will appear at index 1 of Codes(). //! received will appear at index 1 of Codes().
//! //!
//! On Windows, this will either be `0` if the exception is continuable, or //! On Windows, this will either be `0` if the exception is continuable, or
@ -85,7 +85,7 @@ class ExceptionSnapshot {
//! the instruction pointer that contained an offending instruction. For //! the instruction pointer that contained an offending instruction. For
//! exceptions where this value cannot be determined, it will be `0`. //! exceptions where this value cannot be determined, it will be `0`.
//! //!
//! For Mac OS X, this will be the value of the exception code at index 1 as //! For macOS, this will be the value of the exception code at index 1 as
//! received by a Mach exception handler. //! received by a Mach exception handler.
virtual uint64_t ExceptionAddress() const = 0; virtual uint64_t ExceptionAddress() const = 0;
@ -97,7 +97,7 @@ class ExceptionSnapshot {
//! they may not be present at all. In this case, an empty vector will be //! they may not be present at all. In this case, an empty vector will be
//! returned. //! returned.
//! //!
//! For Mac OS X, this will be a vector containing the original exception type //! For macOS, this will be a vector containing the original exception type
//! and the values of `code[0]` and `code[1]` as received by a Mach exception //! and the values of `code[0]` and `code[1]` as received by a Mach exception
//! handler. //! handler.
//! //!

View File

@ -27,7 +27,7 @@ namespace internal {
#if defined(ARCH_CPU_X86_FAMILY) || DOXYGEN #if defined(ARCH_CPU_X86_FAMILY) || DOXYGEN
//! \brief Initializes a CPUContextX86 structure from native context structures //! \brief Initializes a CPUContextX86 structure from native context structures
//! on Mac OS X. //! on macOS.
//! //!
//! \a flavor, \a state, and \a state_count may be supplied by exception //! \a flavor, \a state, and \a state_count may be supplied by exception
//! handlers in order for the \a context parameter to be initialized by the //! handlers in order for the \a context parameter to be initialized by the
@ -68,7 +68,7 @@ void InitializeCPUContextX86(CPUContextX86* context,
const x86_debug_state32_t* x86_debug_state32); const x86_debug_state32_t* x86_debug_state32);
//! \brief Initializes a CPUContextX86_64 structure from native context //! \brief Initializes a CPUContextX86_64 structure from native context
//! structures on Mac OS X. //! structures on macOS.
//! //!
//! \a flavor, \a state, and \a state_count may be supplied by exception //! \a flavor, \a state, and \a state_count may be supplied by exception
//! handlers in order for the \a context parameter to be initialized by the //! handlers in order for the \a context parameter to be initialized by the

View File

@ -34,7 +34,7 @@ class ProcessReader;
namespace internal { namespace internal {
//! \brief An ExceptionSnapshot of an exception sustained by a running (or //! \brief An ExceptionSnapshot of an exception sustained by a running (or
//! crashed) process on a Mac OS X system. //! crashed) process on a macOS system.
class ExceptionSnapshotMac final : public ExceptionSnapshot { class ExceptionSnapshotMac final : public ExceptionSnapshot {
public: public:
ExceptionSnapshotMac(); ExceptionSnapshotMac();
@ -47,6 +47,14 @@ class ExceptionSnapshotMac final : public ExceptionSnapshot {
//! //!
//! \param[in] process_reader A ProcessReader for the task that sustained the //! \param[in] process_reader A ProcessReader for the task that sustained the
//! exception. //! exception.
//! \param[in] behavior
//! \param[in] exception_thread
//! \param[in] exception
//! \param[in] code
//! \param[in] code_count
//! \param[in,out] flavor
//! \param[in] state
//! \param[in] state_count
//! //!
//! \return `true` if the snapshot could be created, `false` otherwise with //! \return `true` if the snapshot could be created, `false` otherwise with
//! an appropriate message logged. //! an appropriate message logged.

View File

@ -199,8 +199,8 @@ class TestMachOImageAnnotationsReader final
for (const std::string& annotation : all_annotations_vector) { for (const std::string& annotation : all_annotations_vector) {
// Look for the expectation as a leading susbtring, because the actual // Look for the expectation as a leading susbtring, because the actual
// string that dyld uses will have the contents of the // string that dyld uses will have the contents of the
// DYLD_INSERT_LIBRARIES environment variable appended to it on Mac // DYLD_INSERT_LIBRARIES environment variable appended to it on OS X
// OS X 10.10. // 10.10.
if (annotation.substr(0, expected_annotation.length()) == if (annotation.substr(0, expected_annotation.length()) ==
expected_annotation) { expected_annotation) {
found = true; found = true;
@ -217,8 +217,8 @@ class TestMachOImageAnnotationsReader final
bool found = false; bool found = false;
for (const std::string& annotation : all_annotations_vector) { for (const std::string& annotation : all_annotations_vector) {
// Look for the expectation as a leading substring, because the actual // Look for the expectation as a leading substring, because the actual
// string will contain the librarys pathname and, on Mac OS X 10.9 // string will contain the librarys pathname and, on OS X 10.9 and
// and later, a reason. // later, a reason.
if (annotation.substr(0, expected_annotation_length) == if (annotation.substr(0, expected_annotation_length) ==
kExpectedAnnotation) { kExpectedAnnotation) {
found = true; found = true;

View File

@ -27,7 +27,7 @@ namespace crashpad {
namespace internal { namespace internal {
//! \brief A MemorySnapshot of a memory region in a process on the running //! \brief A MemorySnapshot of a memory region in a process on the running
//! system, when the system runs Mac OS X. //! system, when the system runs macOS.
class MemorySnapshotMac final : public MemorySnapshot { class MemorySnapshotMac final : public MemorySnapshot {
public: public:
MemorySnapshotMac(); MemorySnapshotMac();

View File

@ -191,18 +191,18 @@ class ProcessReader {
//! tag value. If these conditions cannot be met fully, as much of the red //! tag value. If these conditions cannot be met fully, as much of the red
//! zone will be captured as is possible while meeting these conditions. //! zone will be captured as is possible while meeting these conditions.
//! //!
//! \param[inout] start_address The base address of the region to begin //! \param[in,out] start_address The base address of the region to begin
//! capturing stack memory from. On entry, \a start_address is the stack //! capturing stack memory from. On entry, \a start_address is the stack
//! pointer. On return, \a start_address may be decreased to encompass a //! pointer. On return, \a start_address may be decreased to encompass a
//! red zone. //! red zone.
//! \param[inout] region_base The base address of the region that contains //! \param[in,out] region_base The base address of the region that contains
//! stack memory. This is distinct from \a start_address in that \a //! stack memory. This is distinct from \a start_address in that \a
//! region_base will be page-aligned. On entry, \a region_base is the //! region_base will be page-aligned. On entry, \a region_base is the
//! base address of a region that contains \a start_address. On return, //! base address of a region that contains \a start_address. On return,
//! if \a start_address is decremented and is outside of the region //! if \a start_address is decremented and is outside of the region
//! originally described by \a region_base, \a region_base will also be //! originally described by \a region_base, \a region_base will also be
//! decremented appropriately. //! decremented appropriately.
//! \param[inout] region_size The size of the region that contains stack //! \param[in,out] region_size The size of the region that contains stack
//! memory. This region begins at \a region_base. On return, if \a //! memory. This region begins at \a region_base. On return, if \a
//! region_base is decremented, \a region_size will be incremented //! region_base is decremented, \a region_size will be incremented
//! appropriately. //! appropriately.

View File

@ -587,7 +587,7 @@ class ScopedOpenCLNoOpKernel {
ASSERT_EQ(CL_SUCCESS, rv) << "clCreateContext"; ASSERT_EQ(CL_SUCCESS, rv) << "clCreateContext";
// The goal of the program in |sources| is to produce a cl_kernels image // The goal of the program in |sources| is to produce a cl_kernels image
// that doesnt strictly conform to Mach-O expectations. On Mac OS X 10.10, // that doesnt strictly conform to Mach-O expectations. On OS X 10.10,
// cl_kernels modules show up with an __LD,__compact_unwind section, showing // cl_kernels modules show up with an __LD,__compact_unwind section, showing
// up in the __TEXT segment. MachOImageSegmentReader would normally reject // up in the __TEXT segment. MachOImageSegmentReader would normally reject
// modules for this problem, but a special exception is made when this // modules for this problem, but a special exception is made when this

View File

@ -46,8 +46,8 @@
namespace crashpad { namespace crashpad {
//! \brief A ProcessSnapshot of a running (or crashed) process running on a Mac //! \brief A ProcessSnapshot of a running (or crashed) process running on a
//! OS X system. //! macOS system.
class ProcessSnapshotMac final : public ProcessSnapshot { class ProcessSnapshotMac final : public ProcessSnapshot {
public: public:
ProcessSnapshotMac(); ProcessSnapshotMac();
@ -83,21 +83,21 @@ class ProcessSnapshotMac final : public ProcessSnapshot {
//! \brief Sets the value to be returned by ReportID(). //! \brief Sets the value to be returned by ReportID().
//! //!
//! On Mac OS X, the crash report ID is under the control of the snapshot //! On macOS, the crash report ID is under the control of the snapshot
//! producer, which may call this method to set the report ID. If this is not //! producer, which may call this method to set the report ID. If this is not
//! done, ReportID() will return an identifier consisting entirely of zeroes. //! done, ReportID() will return an identifier consisting entirely of zeroes.
void SetReportID(const UUID& report_id) { report_id_ = report_id; } void SetReportID(const UUID& report_id) { report_id_ = report_id; }
//! \brief Sets the value to be returned by ClientID(). //! \brief Sets the value to be returned by ClientID().
//! //!
//! On Mac OS X, the client ID is under the control of the snapshot producer, //! On macOS, the client ID is under the control of the snapshot producer,
//! which may call this method to set the client ID. If this is not done, //! which may call this method to set the client ID. If this is not done,
//! ClientID() will return an identifier consisting entirely of zeroes. //! ClientID() will return an identifier consisting entirely of zeroes.
void SetClientID(const UUID& client_id) { client_id_ = client_id; } void SetClientID(const UUID& client_id) { client_id_ = client_id; }
//! \brief Sets the value to be returned by AnnotationsSimpleMap(). //! \brief Sets the value to be returned by AnnotationsSimpleMap().
//! //!
//! On Mac OS X, all process annotations are under the control of the snapshot //! On macOS, all process annotations are under the control of the snapshot
//! producer, which may call this method to establish these annotations. //! producer, which may call this method to establish these annotations.
//! Contrast this with module annotations, which are under the control of the //! Contrast this with module annotations, which are under the control of the
//! process being snapshotted. //! process being snapshotted.

View File

@ -43,7 +43,7 @@ PROCESS_TYPE_STRUCT_BEGIN(crashreporter_annotations_t)
PROCESS_TYPE_STRUCT_MEMBER(uint64_t, version) // unsigned long PROCESS_TYPE_STRUCT_MEMBER(uint64_t, version) // unsigned long
PROCESS_TYPE_STRUCT_VERSIONED(crashreporter_annotations_t, version) PROCESS_TYPE_STRUCT_VERSIONED(crashreporter_annotations_t, version)
// Version 4 (Mac OS X 10.7) // Version 4 (OS X 10.7)
PROCESS_TYPE_STRUCT_MEMBER(uint64_t, message) // char* PROCESS_TYPE_STRUCT_MEMBER(uint64_t, message) // char*
PROCESS_TYPE_STRUCT_MEMBER(uint64_t, signature_string) // char* PROCESS_TYPE_STRUCT_MEMBER(uint64_t, signature_string) // char*
PROCESS_TYPE_STRUCT_MEMBER(uint64_t, backtrace) // char* PROCESS_TYPE_STRUCT_MEMBER(uint64_t, backtrace) // char*

View File

@ -21,6 +21,8 @@
#include "snapshot/mac/process_types/internal.h" #include "snapshot/mac/process_types/internal.h"
#include "util/mach/task_memory.h" #include "util/mach/task_memory.h"
#if !DOXYGEN
namespace crashpad { namespace crashpad {
namespace process_types { namespace process_types {
namespace internal { namespace internal {
@ -157,3 +159,5 @@ bool crashreporter_annotations_t<Traits>::ReadInto(
} // namespace internal } // namespace internal
} // namespace process_types } // namespace process_types
} // namespace crashpad } // namespace crashpad
#endif // !DOXYGEN

View File

@ -83,8 +83,8 @@ TEST(ProcessTypes, DyldImagesSelf) {
dyld_info.all_image_info_addr); dyld_info.all_image_info_addr);
EXPECT_GT(dyld_info.all_image_info_size, 1u); EXPECT_GT(dyld_info.all_image_info_size, 1u);
// This field is only present in the Mac OS X 10.7 SDK (at build time) and // This field is only present in the OS X 10.7 SDK (at build time) and kernel
// kernel (at run time). // (at run time).
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (MacOSXMinorVersion() >= 7) { if (MacOSXMinorVersion() >= 7) {
#if !defined(ARCH_CPU_64_BITS) #if !defined(ARCH_CPU_64_BITS)

View File

@ -228,7 +228,7 @@ uint32_t SystemSnapshotMac::CPUX86Leaf7Features() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_); INITIALIZATION_STATE_DCHECK_VALID(initialized_);
#if defined(ARCH_CPU_X86_FAMILY) #if defined(ARCH_CPU_X86_FAMILY)
// The machdep.cpu.leaf7_feature_bits sysctl isnt supported prior to Mac OS X // The machdep.cpu.leaf7_feature_bits sysctl isnt supported prior to OS X
// 10.7, so read this by calling cpuid directly. // 10.7, so read this by calling cpuid directly.
// //
// machdep.cpu.max_basic could be used to check whether to read the leaf, but // machdep.cpu.max_basic could be used to check whether to read the leaf, but

View File

@ -33,7 +33,7 @@ class ProcessReader;
namespace internal { namespace internal {
//! \brief A ThreadSnapshot of a thread in a running (or crashed) process on a //! \brief A ThreadSnapshot of a thread in a running (or crashed) process on a
//! Mac OS X system. //! macOS system.
class ThreadSnapshotMac final : public ThreadSnapshot { class ThreadSnapshotMac final : public ThreadSnapshot {
public: public:
ThreadSnapshotMac(); ThreadSnapshotMac();

View File

@ -82,8 +82,8 @@ class ModuleSnapshot {
//! \brief The module is a dynamic loader. //! \brief The module is a dynamic loader.
//! //!
//! This is the module responsible for loading other modules. This is //! This is the module responsible for loading other modules. This is
//! normally `dyld` for Mac OS X and `ld.so` for Linux and other systems //! normally `dyld` for macOS and `ld.so` for Linux and other systems using
//! using ELF. //! ELF.
kModuleTypeDynamicLoader, kModuleTypeDynamicLoader,
}; };
@ -97,7 +97,7 @@ class ModuleSnapshot {
//! \brief Returns the size that the module occupies in the snapshot process //! \brief Returns the size that the module occupies in the snapshot process
//! address space, starting at its base address. //! address space, starting at its base address.
//! //!
//! For Mac OS X snapshots, this method only reports the size of the `__TEXT` //! For macOS snapshots, this method only reports the size of the `__TEXT`
//! segment, because segments may not be loaded contiguously. //! segment, because segments may not be loaded contiguously.
virtual uint64_t Size() const = 0; virtual uint64_t Size() const = 0;
@ -113,7 +113,7 @@ class ModuleSnapshot {
//! If no file version can be determined, the \a version_* parameters are set //! If no file version can be determined, the \a version_* parameters are set
//! to `0`. //! to `0`.
//! //!
//! For Mac OS X snapshots, this is taken from the modules `LC_ID_DYLIB` load //! For macOS snapshots, this is taken from the modules `LC_ID_DYLIB` load
//! command for shared libraries, and is `0` for other module types. //! command for shared libraries, and is `0` for other module types.
virtual void FileVersion(uint16_t* version_0, virtual void FileVersion(uint16_t* version_0,
uint16_t* version_1, uint16_t* version_1,
@ -125,8 +125,8 @@ class ModuleSnapshot {
//! If no source version can be determined, the \a version_* parameters are //! If no source version can be determined, the \a version_* parameters are
//! set to `0`. //! set to `0`.
//! //!
//! For Mac OS X snapshots, this is taken from the modules //! For macOS snapshots, this is taken from the modules `LC_SOURCE_VERSION`
//! `LC_SOURCE_VERSION` load command. //! load command.
virtual void SourceVersion(uint16_t* version_0, virtual void SourceVersion(uint16_t* version_0,
uint16_t* version_1, uint16_t* version_1,
uint16_t* version_2, uint16_t* version_2,
@ -164,7 +164,7 @@ class ModuleSnapshot {
//! are intended for diagnostic use, including crash analysis. A module may //! are intended for diagnostic use, including crash analysis. A module may
//! contain multiple annotations, so they are returned in a vector. //! contain multiple annotations, so they are returned in a vector.
//! //!
//! For Mac OS X snapshots, these annotations are found by interpreting the //! For macOS snapshots, these annotations are found by interpreting the
//! modules `__DATA,__crash_info` section as `crashreporter_annotations_t`. //! modules `__DATA,__crash_info` section as `crashreporter_annotations_t`.
//! System libraries using the crash reporter client interface may reference //! System libraries using the crash reporter client interface may reference
//! annotations in this structure. Additional annotations messages may be //! annotations in this structure. Additional annotations messages may be
@ -183,7 +183,7 @@ class ModuleSnapshot {
//! keys and values are strings. These are referred to in Chrome as “crash //! keys and values are strings. These are referred to in Chrome as “crash
//! keys.” //! keys.”
//! //!
//! For Mac OS X snapshots, these annotations are found by interpreting the //! For macOS snapshots, these annotations are found by interpreting the
//! `__DATA,crashpad_info` section as `CrashpadInfo`. Clients can use the //! `__DATA,crashpad_info` section as `CrashpadInfo`. Clients can use the
//! Crashpad client interface to store annotations in this structure. Most //! Crashpad client interface to store annotations in this structure. Most
//! annotations under the clients direct control will be retrievable by this //! annotations under the clients direct control will be retrievable by this

View File

@ -36,7 +36,7 @@ class SystemSnapshot {
//! \brief The snapshot systems operating system is unknown. //! \brief The snapshot systems operating system is unknown.
kOperatingSystemUnknown = 0, kOperatingSystemUnknown = 0,
//! \brief Mac OS X. //! \brief macOS.
kOperatingSystemMacOSX, kOperatingSystemMacOSX,
//! \brief Windows. //! \brief Windows.
@ -104,7 +104,7 @@ class SystemSnapshot {
virtual std::string CPUVendor() const = 0; virtual std::string CPUVendor() const = 0;
//! \brief Returns frequency information about the snapshot systems CPUs in //! \brief Returns frequency information about the snapshot systems CPUs in
//! \current_hz and \a max_hz. //! \a current_hz and \a max_hz.
//! //!
//! \param[out] current_hz The snapshot systems CPU clock frequency in Hz at //! \param[out] current_hz The snapshot systems CPU clock frequency in Hz at
//! the time of the snapshot. //! the time of the snapshot.
@ -198,21 +198,21 @@ class SystemSnapshot {
//! in \a major, \a minor, \a bugfix, and \a build. //! in \a major, \a minor, \a bugfix, and \a build.
//! //!
//! \param[out] major The snapshot systems operating systems first (major) //! \param[out] major The snapshot systems operating systems first (major)
//! version number component. This would be `10` for Mac OS X 10.9.5, and //! version number component. This would be `10` for macOS 10.12.1, and
//! `6` for Windows 7 (NT 6.1) SP1 version 6.1.7601. //! `6` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
//! \param[out] minor The snapshot systems operating systems second (minor) //! \param[out] minor The snapshot systems operating systems second (minor)
//! version number component. This would be `9` for Mac OS X 10.9.5, and //! version number component. This would be `12` for macOS 10.12.1, and
//! `1` for Windows 7 (NT 6.1) SP1 version 6.1.7601. //! `1` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
//! \param[out] bugfix The snapshot systems operating systems third (bugfix) //! \param[out] bugfix The snapshot systems operating systems third (bugfix)
//! version number component. This would be `5` for Mac OS X 10.9.5, and //! version number component. This would be `1` for macOS 10.12.1, and
//! `7601` for Windows 7 (NT 6.1) SP1 version 6.1.7601. //! `7601` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
//! \param[out] build A string further identifying an operating system //! \param[out] build A string further identifying an operating system
//! version. For Mac OS X 10.9.5, this would be `"13F34"`. For Windows, //! version. For macOS 10.12.1, this would be `"16B2657"`. For Windows,
//! this would be `"Service Pack 1"` if that service pack was installed. //! this would be `"Service Pack 1"` if that service pack was installed.
//! For Linux and other Unix-like systems, this would be the kernel //! On Android, the `ro.build.fingerprint` system property would be
//! version from `uname -srvm`, possibly with additional information //! appended. For Linux and other Unix-like systems, this would be the
//! appended. On Android, the `ro.build.fingerprint` system property would //! kernel version from `uname -srvm`, possibly with additional
//! be appended. //! information appended.
virtual void OSVersion(int* major, virtual void OSVersion(int* major,
int* minor, int* minor,
int* bugfix, int* bugfix,
@ -221,17 +221,17 @@ class SystemSnapshot {
//! \brief Returns the snapshot systems full operating system version //! \brief Returns the snapshot systems full operating system version
//! information in string format. //! information in string format.
//! //!
//! For Mac OS X, the string contains values from the operating system and //! For macOS, the string contains values from the operating system and
//! kernel. A Mac OS X 10.9.5 snapshot system would be identified as `"Mac OS //! kernel. A macOS 10.12.1 system snapshot would be identified as `"Mac OS
//! X 10.9.5 (13F34); Darwin 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 //! X 10.12.1 (16B2657); Darwin 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct
//! 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64"`. //! 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64"`.
virtual std::string OSVersionFull() const = 0; virtual std::string OSVersionFull() const = 0;
//! \brief Returns a description of the snapshot systems hardware in string //! \brief Returns a description of the snapshot systems hardware in string
//! format. //! format.
//! //!
//! For Mac OS X, the string contains the Mac model and board ID. A mid-2014 //! For macOS, the string contains the Mac model and board ID. A mid-2014 15"
//! 15" MacBook Pro would be identified as `"MacBookPro11,3 //! MacBook Pro would be identified as `"MacBookPro11,3
//! (Mac-2BD1B31983FE1663)"`. //! (Mac-2BD1B31983FE1663)"`.
virtual std::string MachineDescription() const = 0; virtual std::string MachineDescription() const = 0;
@ -258,7 +258,7 @@ class SystemSnapshot {
//! being observed. //! being observed.
//! \param[out] daylight_name The name of the time zone while daylight saving //! \param[out] daylight_name The name of the time zone while daylight saving
//! time is being observed. //! time is being observed.
virtual void TimeZone(DaylightSavingTimeStatus* observes_daylight, virtual void TimeZone(DaylightSavingTimeStatus* dst_status,
int* standard_offset_seconds, int* standard_offset_seconds,
int* daylight_offset_seconds, int* daylight_offset_seconds,
std::string* standard_name, std::string* standard_name,

View File

@ -121,7 +121,7 @@ class TestProcessSnapshot final : public ProcessSnapshot {
//! \brief Adds a handle snapshot to be returned by Handles(). //! \brief Adds a handle snapshot to be returned by Handles().
//! //!
//! \param[in] region The handle snapshot that will be included in Handles(). //! \param[in] handle The handle snapshot that will be included in Handles().
void AddHandle(const HandleSnapshot& handle) { void AddHandle(const HandleSnapshot& handle) {
handles_.push_back(handle); handles_.push_back(handle);
} }

View File

@ -53,9 +53,9 @@ class ExceptionSnapshotWin final : public ExceptionSnapshot {
//! \param[in] process_reader A ProcessReader for the process that sustained //! \param[in] process_reader A ProcessReader for the process that sustained
//! the exception. //! the exception.
//! \param[in] thread_id The thread ID in which the exception occurred. //! \param[in] thread_id The thread ID in which the exception occurred.
//! \param[in] exception_pointers_address The address of an //! \param[in] exception_pointers The address of an `EXCEPTION_POINTERS`
//! `EXCEPTION_POINTERS` record in the target process, passed through from //! record in the target process, passed through from the exception
//! the exception handler. //! handler.
//! //!
//! \note If the exception was triggered by //! \note If the exception was triggered by
//! CrashpadClient::DumpAndCrashTargetProcess(), this has the side-effect //! CrashpadClient::DumpAndCrashTargetProcess(), this has the side-effect

View File

@ -41,8 +41,8 @@ class PEImageAnnotationsReader {
//! \brief Constructs the object. //! \brief Constructs the object.
//! //!
//! \param[in] process_reader The reader for the remote process. //! \param[in] process_reader The reader for the remote process.
//! \param[in] image_reader The PEImageReader for the PE image file contained //! \param[in] pe_image_reader The PEImageReader for the PE image file
//! within the remote process. //! contained within the remote process.
//! \param[in] name The module's name, a string to be used in logged messages. //! \param[in] name The module's name, a string to be used in logged messages.
//! This string is for diagnostic purposes only, and may be empty. //! This string is for diagnostic purposes only, and may be empty.
PEImageAnnotationsReader(ProcessReaderWin* process_reader, PEImageAnnotationsReader(ProcessReaderWin* process_reader,

View File

@ -48,7 +48,7 @@ class ThreadSnapshotWin final : public ThreadSnapshot {
//! the thread. //! the thread.
//! \param[in] process_reader_thread The thread within the ProcessReaderWin //! \param[in] process_reader_thread The thread within the ProcessReaderWin
//! for which the snapshot should be created. //! for which the snapshot should be created.
//! \param[in] gather_indirectly_referenced_memory_bytes_remaining. If //! \param[in,out] gather_indirectly_referenced_memory_bytes_remaining If
//! non-null, add extra memory regions to the snapshot pointed to by the //! non-null, add extra memory regions to the snapshot pointed to by the
//! thread's stack. The size of the regions added is subtracted from the //! thread's stack. The size of the regions added is subtracted from the
//! count, and when it's `0`, no more regions will be added. //! count, and when it's `0`, no more regions will be added.

View File

@ -71,7 +71,7 @@ class WinMultiprocess {
//! //!
//! The default expected termination code is `EXIT_SUCCESS` (`0`). //! The default expected termination code is `EXIT_SUCCESS` (`0`).
//! //!
//! \param[in] code The expected exit status of the child. //! \param[in] exit_code The expected exit status of the child.
void SetExpectedChildExitCode(unsigned int exit_code); void SetExpectedChildExitCode(unsigned int exit_code);
//! \brief Returns the read pipe's file handle. //! \brief Returns the read pipe's file handle.

View File

@ -13,11 +13,11 @@ like ar, as, nm, strings, and strip, and platform-specific tools like lipo and
otool. It also contains support libraries such as libmacho, which contains otool. It also contains support libraries such as libmacho, which contains
interfaces for dealing with Mach-O images. interfaces for dealing with Mach-O images.
libmacho is available on Mac OS X as a runtime library that is part of libmacho is available on macOS as a runtime library that is part of libSystem,
libSystem, but versions of libmacho included in operating system versions prior but versions of libmacho included in operating system versions prior to Mac OS X
to Mac OS X 10.7 did not include the getsectiondata() and getsegmentdata() 10.7 did not include the getsectiondata() and getsegmentdata() functions. This
functions. This library is present here to provide implementations of these library is present here to provide implementations of these functions for
functions for systems that do not have them. systems that do not have them.
Crashpad code is not expected to use this library directly. It should use the Crashpad code is not expected to use this library directly. It should use the
getsectiondata() and getsegmentdata() wrappers in compat, which will use getsectiondata() and getsegmentdata() wrappers in compat, which will use

View File

@ -41,6 +41,8 @@ class ToolSupport {
//! of its arguments. //! of its arguments.
//! //!
//! \param[in] me The tools name, the basename of `argv[0]`. //! \param[in] me The tools name, the basename of `argv[0]`.
//! \param[in] hint A hint to display before the suggestion to try `--help`.
//! Optional, may be `nullptr`, in which case no hint will be presented.
static void UsageHint(const base::FilePath& me, const char* hint); static void UsageHint(const base::FilePath& me, const char* hint);
#if defined(OS_POSIX) || DOXYGEN #if defined(OS_POSIX) || DOXYGEN

View File

@ -27,9 +27,9 @@ namespace crashpad {
//! \{ //! \{
//! \brief Wraps the `<launch.h>` function of the same name. //! \brief Wraps the `<launch.h>` function of the same name.
//! //!
//! The Mac OS X 10.10 SDK deprecates `<launch.h>`, although the functionality //! The OS X 10.10 SDK deprecates `<launch.h>`, although the functionality it
//! it provides is still useful. These wrappers allow the deprecated functions //! provides is still useful. These wrappers allow the deprecated functions to
//! to be called without triggering deprecated-declaration warnings. //! be called without triggering deprecated-declaration warnings.
inline launch_data_t LaunchDataAlloc(launch_data_type_t type) { inline launch_data_t LaunchDataAlloc(launch_data_type_t type) {
return launch_data_alloc(type); return launch_data_alloc(type);

View File

@ -181,9 +181,8 @@ std::string IORegistryEntryDataPropertyAsString(io_registry_entry_t entry,
namespace crashpad { namespace crashpad {
int MacOSXMinorVersion() { int MacOSXMinorVersion() {
// The Darwin major version is always 4 greater than the Mac OS X minor // The Darwin major version is always 4 greater than the macOS minor version
// version for Darwin versions beginning with 6, corresponding to Mac OS X // for Darwin versions beginning with 6, corresponding to Mac OS X 10.2.
// 10.2.
static int mac_os_x_minor_version = DarwinMajorVersion() - 4; static int mac_os_x_minor_version = DarwinMajorVersion() - 4;
DCHECK(mac_os_x_minor_version >= 2); DCHECK(mac_os_x_minor_version >= 2);
return mac_os_x_minor_version; return mac_os_x_minor_version;

View File

@ -21,8 +21,8 @@ namespace crashpad {
//! \brief Returns the version of the running operating system. //! \brief Returns the version of the running operating system.
//! //!
//! \return The minor version of the operating system, such as `9` for Mac OS X //! \return The minor version of the operating system, such as `12` for macOS
//! 10.9.2. //! 10.12.1.
//! //!
//! \note This is similar to the base::mac::IsOS*() family of functions, but //! \note This is similar to the base::mac::IsOS*() family of functions, but
//! is provided for situations where the caller needs to obtain version //! is provided for situations where the caller needs to obtain version
@ -35,17 +35,17 @@ int MacOSXMinorVersion();
//! All parameters are required. No parameter may be `nullptr`. //! All parameters are required. No parameter may be `nullptr`.
//! //!
//! \param[out] major The major version of the operating system, such as `10` //! \param[out] major The major version of the operating system, such as `10`
//! for Mac OS X 10.9.2. //! for macOS 10.12.1.
//! \param[out] minor The major version of the operating system, such as `9` for //! \param[out] minor The major version of the operating system, such as `12`
//! Mac OS X 10.9.2. //! for macOS 10.12.1.
//! \param[out] bugfix The bugfix version of the operating system, such as `2` //! \param[out] bugfix The bugfix version of the operating system, such as `1`
//! for Mac OS X 10.9.2. //! for macOS 10.12.1.
//! \param[out] build The operating systems build string, such as "13C64" for //! \param[out] build The operating systems build string, such as `"16B2657"`
//! Mac OS X 10.9.2. //! for macOS 10.12.1.
//! \param[out] server `true` for a Mac OS X Server installation, `false` //! \param[out] server `true` for a macOS Server installation, `false` otherwise
//! otherwise (for a desktop/laptop, client, or workstation system). //! (for a desktop/laptop, client, or workstation system).
//! \param[out] version_string A string representing the full operating system //! \param[out] version_string A string representing the full operating system
//! version, such as `"Mac OS X 10.9.2 (13C64)"`. //! version, such as `"macOS 10.12.1 (16B2657)"`.
//! //!
//! \return `true` on success, `false` on failure, with an error message logged. //! \return `true` on success, `false` on failure, with an error message logged.
//! A failure is considered to have occurred if any element could not be //! A failure is considered to have occurred if any element could not be

View File

@ -28,8 +28,8 @@ namespace crashpad {
//! //!
//! \return `true` if the job was submitted successfully, otherwise `false`. //! \return `true` if the job was submitted successfully, otherwise `false`.
//! //!
//! \note This function is provided because `SMJobSubmit()` is deprecated in Mac //! \note This function is provided because `SMJobSubmit()` is deprecated in OS
//! OS X 10.10. It may or may not be implemented using `SMJobSubmit()` from //! X 10.10. It may or may not be implemented using `SMJobSubmit()` from
//! `ServiceManagement.framework`. //! `ServiceManagement.framework`.
bool ServiceManagementSubmitJob(CFDictionaryRef job_cf); bool ServiceManagementSubmitJob(CFDictionaryRef job_cf);
@ -42,12 +42,11 @@ bool ServiceManagementSubmitJob(CFDictionaryRef job_cf);
//! \return `true` if the job was removed successfully or if an asynchronous //! \return `true` if the job was removed successfully or if an asynchronous
//! attempt to remove the job was started successfully, otherwise `false`. //! attempt to remove the job was started successfully, otherwise `false`.
//! //!
//! \note This function is provided because `SMJobRemove()` is deprecated in Mac //! \note This function is provided because `SMJobRemove()` is deprecated in OS
//! OS X 10.10. On Mac OS X 10.10, observed in DP8 14A361c, it also blocks //! X 10.10. On OS X 10.10, observed in DP8 14A361c, it also blocks for far
//! for far too long (`_block_until_job_exits()` contains a one-second //! too long (`_block_until_job_exits()` contains a one-second `sleep()`,
//! `sleep()`, filed as radar 18398683) and does not signal failure via its //! filed as radar 18398683) and does not signal failure via its return
//! return value when asked to remove a nonexistent job (filed as radar //! value when asked to remove a nonexistent job (filed as radar 18268941).
//! 18268941).
bool ServiceManagementRemoveJob(const std::string& label, bool wait); bool ServiceManagementRemoveJob(const std::string& label, bool wait);
//! \brief Determines whether a specified job is loaded in the user launchd //! \brief Determines whether a specified job is loaded in the user launchd
@ -60,7 +59,7 @@ bool ServiceManagementRemoveJob(const std::string& label, bool wait);
//! \note A loaded job is not necessarily presently running, nor has it //! \note A loaded job is not necessarily presently running, nor has it
//! necessarily ever run in the past. //! necessarily ever run in the past.
//! \note This function is provided because `SMJobCopyDictionary()` is //! \note This function is provided because `SMJobCopyDictionary()` is
//! deprecated in Mac OS X 10.10. It may or may not be implemented using //! deprecated in OS X 10.10. It may or may not be implemented using
//! `SMJobCopyDictionary()` from `ServiceManagement.framework`. //! `SMJobCopyDictionary()` from `ServiceManagement.framework`.
bool ServiceManagementIsJobLoaded(const std::string& label); bool ServiceManagementIsJobLoaded(const std::string& label);
@ -72,7 +71,7 @@ bool ServiceManagementIsJobLoaded(const std::string& label);
//! \return The jobs process ID if running, otherwise `0`. //! \return The jobs process ID if running, otherwise `0`.
//! //!
//! \note This function is provided because `SMJobCopyDictionary()` is //! \note This function is provided because `SMJobCopyDictionary()` is
//! deprecated in Mac OS X 10.10. It may or may not be implemented using //! deprecated in OS X 10.10. It may or may not be implemented using
//! `SMJobCopyDictionary()` from `ServiceManagement.framework`. //! `SMJobCopyDictionary()` from `ServiceManagement.framework`.
pid_t ServiceManagementIsJobRunning(const std::string& label); pid_t ServiceManagementIsJobRunning(const std::string& label);

View File

@ -117,8 +117,8 @@ bool WriteXattrInt(const base::FilePath& file,
XattrStatus ReadXattrTimeT(const base::FilePath& file, XattrStatus ReadXattrTimeT(const base::FilePath& file,
const base::StringPiece& name, const base::StringPiece& name,
time_t* value) { time_t* value) {
// time_t on OS X is defined as a long, but it will be read into an // time_t on macOS is defined as a long, but it will be read into an int64_t
// int64_t here, since there is no string conversion method for long. // here, since there is no string conversion method for long.
std::string tmp; std::string tmp;
XattrStatus status; XattrStatus status;
if ((status = ReadXattr(file, name, &tmp)) != XattrStatus::kOK) if ((status = ReadXattr(file, name, &tmp)) != XattrStatus::kOK)

View File

@ -218,6 +218,9 @@ class ChildPortHandshake {
//! - Regardless of return value, destroys the servers receive right and //! - Regardless of return value, destroys the servers receive right and
//! closes the pipe. //! closes the pipe.
//! //!
//! \param[in] server_write_fd The write side of the pipe shared with the
//! client process. This function takes ownership of this file descriptor,
//! and will close it prior to returning.
//! \param[in] port_right_type The port right type expected to be received //! \param[in] port_right_type The port right type expected to be received
//! from the client. If the port right received from the client does not //! from the client. If the port right received from the client does not
//! match the expected type, the received port right will be destroyed, //! match the expected type, the received port right will be destroyed,
@ -253,9 +256,9 @@ class ChildPortHandshake {
//! `simpleroutine`, and the server does not send a reply. This allows //! `simpleroutine`, and the server does not send a reply. This allows
//! check-in to occur without blocking to wait for a reply. //! check-in to occur without blocking to wait for a reply.
//! //!
//! \param[in] pipe_read The “read” side of the pipe shared with the server //! \param[in] client_read_fd The “read” side of the pipe shared with the
//! process. This function takes ownership of this file descriptor, and //! server process. This function takes ownership of this file descriptor,
//! will close it prior to returning. //! and will close it prior to returning.
//! \param[in] port The port right that will be passed to the server by //! \param[in] port The port right that will be passed to the server by
//! `child_port_check_in()`. //! `child_port_check_in()`.
//! \param[in] right_type The right type to furnish the server with. If \a //! \param[in] right_type The right type to furnish the server with. If \a

View File

@ -37,6 +37,10 @@ class ChildPortServer : public MachMessageServer::Interface {
//! This behaves equivalently to a `handle_child_port_check_in()` function //! This behaves equivalently to a `handle_child_port_check_in()` function
//! used with `child_port_server()`. //! used with `child_port_server()`.
//! //!
//! \param[in] server
//! \param[in] token
//! \param[in] port
//! \param[in] right_type
//! \param[in] trailer The trailer received with the request message. //! \param[in] trailer The trailer received with the request message.
//! \param[out] destroy_request `true` if the request message is to be //! \param[out] destroy_request `true` if the request message is to be
//! destroyed even when this method returns success. See //! destroyed even when this method returns success. See

View File

@ -56,15 +56,25 @@ namespace crashpad {
//! and may be set to `0` (\a old_state_count) or `nullptr` (the remaining //! and may be set to `0` (\a old_state_count) or `nullptr` (the remaining
//! parameters). //! parameters).
//! //!
//! Except as noted, the parameters and return value are equivalent to those of
//! the `*exception_raise*()` family of functions.
//!
//! \param[in] behavior The exception behavior, which dictates which function //! \param[in] behavior The exception behavior, which dictates which function
//! will be called. It is an error to call this function with an invalid //! will be called. It is an error to call this function with an invalid
//! value for \a behavior. //! value for \a behavior.
//! \param[in] code If \behavior indicates a behavior without //! \param[in] exception_port
//! \param[in] thread
//! \param[in] task
//! \param[in] exception
//! \param[in] code If \a behavior indicates a behavior without
//! `MACH_EXCEPTION_CODES`, the elements of \a code will be truncated in //! `MACH_EXCEPTION_CODES`, the elements of \a code will be truncated in
//! order to be passed to the appropriate exception handler. //! order to be passed to the appropriate exception handler.
//! //! \param[in] code_count
//! All other parameters are treated equivalently to their treatment by the //! \param[in,out] flavor
//! `*exception_raise*()` family of functions. //! \param[in] old_state
//! \param[in] old_state_count
//! \param[out] new_state
//! \param[out] new_state_count
//! //!
//! \return The return value of the function called. //! \return The return value of the function called.
kern_return_t UniversalExceptionRaise(exception_behavior_t behavior, kern_return_t UniversalExceptionRaise(exception_behavior_t behavior,

View File

@ -115,7 +115,7 @@ class TestExcClientVariants : public MachMultiprocess,
} }
// Use a flavor known to be different from the incoming flavor, for a test // Use a flavor known to be different from the incoming flavor, for a test
// of the “out” side of the inout flavor parameter. // of the “out” side of the in-out flavor parameter.
*flavor = exception_ + 20; *flavor = exception_ + 20;
*new_state_count = MACHINE_THREAD_STATE_COUNT; *new_state_count = MACHINE_THREAD_STATE_COUNT;

View File

@ -64,17 +64,32 @@ class UniversalMachExcServer final : public MachMessageServer::Interface {
//! This behaves equivalently to a `catch_exception_raise_state_identity()` //! This behaves equivalently to a `catch_exception_raise_state_identity()`
//! function used with `exc_server()`, or a //! function used with `exc_server()`, or a
//! `catch_mach_exception_raise_state_identity()` function used with //! `catch_mach_exception_raise_state_identity()` function used with
//! `mach_exc_server()`. The meanings of most parameters are identical to //! `mach_exc_server()`. Except as noted, the parameters and return value
//! their meanings to these functions. //! are equivalent to those of these other functions.
//! //!
//! \param[in] behavior `EXCEPTION_DEFAULT`, `EXCEPTION_STATE`, //! \param[in] behavior `EXCEPTION_DEFAULT`, `EXCEPTION_STATE`,
//! or `EXCEPTION_STATE_IDENTITY`, possibly with `MACH_EXCEPTION_CODES` //! or `EXCEPTION_STATE_IDENTITY`, possibly with `MACH_EXCEPTION_CODES`
//! ORed in. This identifies which exception request message was //! ORed in. This identifies which exception request message was
//! processed and thus which other parameters are valid. //! processed and thus which other parameters are valid.
//! \param[in] exception_port
//! \param[in] thread
//! \param[in] task
//! \param[in] exception
//! \param[in] code
//! \param[in] code_count
//! \param[in,out] flavor
//! \param[in] old_state
//! \param[in] old_state_count
//! \param[out] new_state
//! \param[out] new_state_count
//! \param[in] trailer The trailer received with the request message. //! \param[in] trailer The trailer received with the request message.
//! \param[out] destroy_request `true` if the request message is to be //! \param[out] destroy_complex_request `true` if the request message is to
//! destroyed even when this method returns success. See //! be destroyed even when this method returns success. See
//! MachMessageServer::Interface. //! MachMessageServer::Interface.
//!
//! \return A code indicating whether the exception was handled. See
//! ExcServerSuccessfulReturnValue() for success codes. On failure,
//! a code such as `KERN_FAILURE`.
virtual kern_return_t CatchMachException( virtual kern_return_t CatchMachException(
exception_behavior_t behavior, exception_behavior_t behavior,
exception_handler_t exception_port, exception_handler_t exception_port,
@ -201,7 +216,7 @@ kern_return_t ExcServerSuccessfulReturnValue(exception_type_t exception,
//! from the \a new_state parameter of //! from the \a new_state parameter of
//! internal::SimplifiedExcServer::Interface::CatchException(), for example. //! internal::SimplifiedExcServer::Interface::CatchException(), for example.
//! This parameter is untouched if \a behavior is not state-carrying. //! This parameter is untouched if \a behavior is not state-carrying.
//! \param[inout] new_state_count On entry, the number of `natural_t` words //! \param[in,out] new_state_count On entry, the number of `natural_t` words
//! available to be written to in \a new_state. On return, the number of //! available to be written to in \a new_state. On return, the number of
//! significant `natural_t` words in \a new_state. This may be taken //! significant `natural_t` words in \a new_state. This may be taken
//! directly from the \a new_state_count parameter of //! directly from the \a new_state_count parameter of

View File

@ -29,9 +29,9 @@
extern "C" { extern "C" {
// proc_get_wakemon_params() is present in the Mac OS X 10.9 SDK, but no // proc_get_wakemon_params() is present in the OS X 10.9 SDK, but no declaration
// declaration is provided. This provides a declaration and marks it for weak // is provided. This provides a declaration and marks it for weak import if the
// import if the deployment target is below 10.9. // deployment target is below 10.9.
int proc_get_wakemon_params(pid_t pid, int* rate_hz, int* flags) int proc_get_wakemon_params(pid_t pid, int* rate_hz, int* flags)
__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
@ -76,8 +76,8 @@ ProcGetWakemonParamsType GetProcGetWakemonParams() {
namespace { namespace {
// Wraps proc_get_wakemon_params(), calling it if the system provides it. Its // Wraps proc_get_wakemon_params(), calling it if the system provides it. Its
// present on Mac OS X 10.9 and later. If its not available, sets errno to // present on OS X 10.9 and later. If its not available, sets errno to ENOSYS
// ENOSYS and returns -1. // and returns -1.
int ProcGetWakemonParams(pid_t pid, int* rate_hz, int* flags) { int ProcGetWakemonParams(pid_t pid, int* rate_hz, int* flags) {
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9
// proc_get_wakemon_params() isnt in the SDK. Look it up dynamically. // proc_get_wakemon_params() isnt in the SDK. Look it up dynamically.
@ -146,17 +146,17 @@ bool IsExceptionNonfatalResource(exception_type_t exception,
// RLIMIT_CPU_USAGE_MONITOR as the second argument and CPUMON_MAKE_FATAL set // RLIMIT_CPU_USAGE_MONITOR as the second argument and CPUMON_MAKE_FATAL set
// in the flags. // in the flags.
if (MacOSXMinorVersion() >= 10) { if (MacOSXMinorVersion() >= 10) {
// In Mac OS X 10.10, the exception code indicates whether the exception // In OS X 10.10, the exception code indicates whether the exception is
// is fatal. See 10.10 xnu-2782.1.97/osfmk/kern/thread.c // fatal. See 10.10 xnu-2782.1.97/osfmk/kern/thread.c
// THIS_THREAD_IS_CONSUMING_TOO_MUCH_CPU__SENDING_EXC_RESOURCE(). // THIS_THREAD_IS_CONSUMING_TOO_MUCH_CPU__SENDING_EXC_RESOURCE().
return resource_flavor == FLAVOR_CPU_MONITOR; return resource_flavor == FLAVOR_CPU_MONITOR;
} }
// In Mac OS X 10.9, theres no way to determine whether the exception is // In OS X 10.9, theres no way to determine whether the exception is fatal.
// fatal. Unlike RESOURCE_TYPE_WAKEUPS below, theres no way to determine // Unlike RESOURCE_TYPE_WAKEUPS below, theres no way to determine this
// this outside the kernel. proc_rlimit_control()s RLIMIT_CPU_USAGE_MONITOR // outside the kernel. proc_rlimit_control()s RLIMIT_CPU_USAGE_MONITOR is
// is the only interface to modify CPUMON_MAKE_FATAL, but its only able to // the only interface to modify CPUMON_MAKE_FATAL, but its only able to set
// set this bit, not obtain its current value. // this bit, not obtain its current value.
// //
// Default to assuming that these exceptions are nonfatal. They are nonfatal // Default to assuming that these exceptions are nonfatal. They are nonfatal
// by default and no users of proc_rlimit_control() were found on 10.9.5 // by default and no users of proc_rlimit_control() were found on 10.9.5

View File

@ -102,7 +102,7 @@ TEST(ExceptionTypes, IsExceptionNonfatalResource) {
EXPECT_TRUE(IsExceptionNonfatalResource(EXC_RESOURCE, code, pid)); EXPECT_TRUE(IsExceptionNonfatalResource(EXC_RESOURCE, code, pid));
if (MacOSXMinorVersion() >= 10) { if (MacOSXMinorVersion() >= 10) {
// FLAVOR_CPU_MONITOR_FATAL was introduced in Mac OS X 10.10. // FLAVOR_CPU_MONITOR_FATAL was introduced in OS X 10.10.
code = 0; code = 0;
EXC_RESOURCE_ENCODE_TYPE(code, RESOURCE_TYPE_CPU); EXC_RESOURCE_ENCODE_TYPE(code, RESOURCE_TYPE_CPU);
EXC_RESOURCE_ENCODE_FLAVOR(code, FLAVOR_CPU_MONITOR_FATAL); EXC_RESOURCE_ENCODE_FLAVOR(code, FLAVOR_CPU_MONITOR_FATAL);

View File

@ -53,7 +53,8 @@ enum : mach_msg_timeout_t {
//! ClockMonotonicNanoseconds(), although this is an implementation detail. //! ClockMonotonicNanoseconds(), although this is an implementation detail.
using MachMessageDeadline = uint64_t; using MachMessageDeadline = uint64_t;
//! \brief Special constants used as \ref MachMessageDeadline values. //! \brief Special constants used as \ref crashpad::MachMessageDeadline
//! "MachMessageDeadline" values.
enum : MachMessageDeadline { enum : MachMessageDeadline {
//! \brief MachMessageWithDeadline() should not block at all in its operation. //! \brief MachMessageWithDeadline() should not block at all in its operation.
kMachMessageDeadlineNonblocking = 0, kMachMessageDeadlineNonblocking = 0,
@ -98,15 +99,22 @@ MachMessageDeadline MachMessageDeadlineFromTimeout(
//! Except as noted, the parameters and return value are identical to those of //! Except as noted, the parameters and return value are identical to those of
//! `mach_msg()`. //! `mach_msg()`.
//! //!
//! \param[in,out] message
//! \param[in] options
//! \param[in] receive_size
//! \param[in] receive_port
//! \param[in] deadline The time by which this call should complete. If the //! \param[in] deadline The time by which this call should complete. If the
//! deadline is exceeded, this call will return `MACH_SEND_TIMED_OUT` or //! deadline is exceeded, this call will return `MACH_SEND_TIMED_OUT` or
//! `MACH_RCV_TIMED_OUT`. //! `MACH_RCV_TIMED_OUT`.
//! \param[in] notify_port
//! \param[in] run_even_if_expired If `true`, a deadline that is expired when //! \param[in] run_even_if_expired If `true`, a deadline that is expired when
//! this function is called will be treated as though a deadline of //! this function is called will be treated as though a deadline of
//! #kMachMessageDeadlineNonblocking had been specified. When `false`, an //! #kMachMessageDeadlineNonblocking had been specified. When `false`, an
//! expired deadline will result in a `MACH_SEND_TIMED_OUT` or //! expired deadline will result in a `MACH_SEND_TIMED_OUT` or
//! `MACH_RCV_TIMED_OUT` return value, even if the deadline is already //! `MACH_RCV_TIMED_OUT` return value, even if the deadline is already
//! expired when the function is called. //! expired when the function is called.
//!
//! \return The return value of `mach_msg()`
mach_msg_return_t MachMessageWithDeadline(mach_msg_header_t* message, mach_msg_return_t MachMessageWithDeadline(mach_msg_header_t* message,
mach_msg_option_t options, mach_msg_option_t options,
mach_msg_size_t receive_size, mach_msg_size_t receive_size,
@ -134,9 +142,9 @@ void PrepareMIGReplyFromRequest(const mach_msg_header_t* in_header,
//! \brief Sets the error code in a reply message for a MIG server routine. //! \brief Sets the error code in a reply message for a MIG server routine.
//! //!
//! \param[inout] out_header The reply message to operate on. \a out_header will //! \param[in,out] out_header The reply message to operate on. \a out_header
//! be treated as a `mig_reply_error_t*` and its `RetCode` field will be //! will be treated as a `mig_reply_error_t*` and its `RetCode` field will
//! set. This argument is accepted as a `mach_msg_header_t*` instead of a //! be set. This argument is accepted as a `mach_msg_header_t*` instead of a
//! `mig_reply_error_t*` because that is the type that callers are expected //! `mig_reply_error_t*` because that is the type that callers are expected
//! to possess in the C API. //! to possess in the C API.
//! \param[in] error The error code to store in \a out_header. //! \param[in] error The error code to store in \a out_header.

View File

@ -147,7 +147,7 @@ mach_msg_return_t MachMessageServer::Run(Interface* interface,
// mach_msg_server() and mach_msg_server_once() would consider whether // mach_msg_server() and mach_msg_server_once() would consider whether
// |options| contains MACH_SEND_TRAILER and include MAX_TRAILER_SIZE in this // |options| contains MACH_SEND_TRAILER and include MAX_TRAILER_SIZE in this
// computation if it does, but that option is ineffective on OS X. // computation if it does, but that option is ineffective on macOS.
const mach_msg_size_t reply_size = interface->MachMessageServerReplySize(); const mach_msg_size_t reply_size = interface->MachMessageServerReplySize();
DCHECK_GE(reply_size, sizeof(mach_msg_empty_send_t)); DCHECK_GE(reply_size, sizeof(mach_msg_empty_send_t));
const mach_msg_size_t reply_alloc = round_page(reply_size); const mach_msg_size_t reply_alloc = round_page(reply_size);

View File

@ -321,9 +321,9 @@ class TestMachMessageServer : public MachMessageServer::Interface,
kern_return_t kr; kern_return_t kr;
if (options_.child_send_all_requests_before_receiving_any_replies) { if (options_.child_send_all_requests_before_receiving_any_replies) {
// On Mac OS X 10.10, the queue limit of a new Mach port seems to be 2 // On OS X 10.10, the queue limit of a new Mach port seems to be 2 by
// by default, which is below the value of MACH_PORT_QLIMIT_DEFAULT. Set // default, which is below the value of MACH_PORT_QLIMIT_DEFAULT. Set the
// the ports queue limit explicitly here. // ports queue limit explicitly here.
mach_port_limits limits = {}; mach_port_limits limits = {};
limits.mpl_qlimit = MACH_PORT_QLIMIT_DEFAULT; limits.mpl_qlimit = MACH_PORT_QLIMIT_DEFAULT;
kr = mach_port_set_attributes(mach_task_self(), kr = mach_port_set_attributes(mach_task_self(),

View File

@ -35,9 +35,9 @@ namespace crashpad {
//! Initialize() methods. The chief advantage of InitializationStateDcheck over //! Initialize() methods. The chief advantage of InitializationStateDcheck over
//! having a member variable to track state is that when the only use of the //! having a member variable to track state is that when the only use of the
//! variable is to DCHECK, it wastes space (in memory and executable code) in //! variable is to DCHECK, it wastes space (in memory and executable code) in
//! non-DCHECK builds unless the code is also peppered with ugly #ifdefs. //! non-DCHECK builds unless the code is also peppered with ugly `#%ifdef`s.
//! //!
//! This implementation concentrates the ugly #ifdefs in one location. //! This implementation concentrates the ugly `#%ifdef`s in one location.
//! //!
//! Usage: //! Usage:
//! //!

View File

@ -89,12 +89,12 @@ class Metrics {
//! \brief Unexpected exception behavior. //! \brief Unexpected exception behavior.
//! //!
//! This value is only used on Mac OS X. //! This value is only used on macOS.
kUnexpectedExceptionBehavior = 1, kUnexpectedExceptionBehavior = 1,
//! \brief Failed due to attempt to suspend self. //! \brief Failed due to attempt to suspend self.
//! //!
//! This value is only used on Mac OS X. //! This value is only used on macOS.
kFailedDueToSuspendSelf = 2, kFailedDueToSuspendSelf = 2,
//! \brief The process snapshot could not be captured. //! \brief The process snapshot could not be captured.

View File

@ -74,9 +74,9 @@ class HTTPTransport {
//! \brief Performs the HTTP request with the configured parameters and waits //! \brief Performs the HTTP request with the configured parameters and waits
//! for the execution to complete. //! for the execution to complete.
//! //!
//! \param[out] response On success, this will be set to the HTTP response //! \param[out] response_body On success, this will be set to the HTTP
//! body. This parameter is optional and may be set to `nullptr` if the //! response body. This parameter is optional and may be set to `nullptr`
//! response body is not required. //! if the response body is not required.
//! //!
//! \return Whether or not the request was successful, defined as returning //! \return Whether or not the request was successful, defined as returning
//! a HTTP status 200 (OK) code. //! a HTTP status 200 (OK) code.

View File

@ -279,7 +279,7 @@ TEST(HTTPTransport, UnchunkedPlainText) {
} }
void RunUpload33k(bool has_content_length) { void RunUpload33k(bool has_content_length) {
// On OS X, NSMutableURLRequest winds up calling into a CFReadStreams Read() // On macOS, NSMutableURLRequest winds up calling into a CFReadStreams Read()
// callback with a 32kB buffer. Make sure that its able to get everything // callback with a 32kB buffer. Make sure that its able to get everything
// when enough is available to fill this buffer, requiring more than one // when enough is available to fill this buffer, requiring more than one
// Read(). // Read().

View File

@ -28,8 +28,8 @@ namespace crashpad {
//! //!
//! Unlike the BSD function, this function may not close file descriptors //! Unlike the BSD function, this function may not close file descriptors
//! immediately, but may instead mark them as close-on-exec. The actual behavior //! immediately, but may instead mark them as close-on-exec. The actual behavior
//! chosen is specific to the operating system. On Mac OS X, file descriptors //! chosen is specific to the operating system. On macOS, file descriptors are
//! are marked close-on-exec instead of being closed outright in order to avoid //! marked close-on-exec instead of being closed outright in order to avoid
//! raising `EXC_GUARD` exceptions for guarded file descriptors that are //! raising `EXC_GUARD` exceptions for guarded file descriptors that are
//! protected against `close()`. //! protected against `close()`.
//! //!

View File

@ -31,10 +31,10 @@ void DropPrivileges() {
// is set not equal to the real ID. This code never specifies -1, so the // is set not equal to the real ID. This code never specifies -1, so the
// setreuid() and setregid() alone should work according to the standard. // setreuid() and setregid() alone should work according to the standard.
// //
// In practice, on Mac OS X, setuid() and setgid() (or seteuid() and // In practice, on older versions of macOS, setuid() and setgid() (or
// setegid()) must be called first. Otherwise, setreuid() and setregid() do // seteuid() and setegid()) must be called first. Otherwise, setreuid() and
// not alter the saved IDs, leaving open the possibility for future privilege // setregid() do not alter the saved IDs, leaving open the possibility for
// escalation. // future privilege escalation.
// //
// The problem exists in 10.9.5 xnu-2422.115.4/bsd/kern/kern_prot.c // The problem exists in 10.9.5 xnu-2422.115.4/bsd/kern/kern_prot.c
// setreuid(). Based on its comments, it purports to set the svuid to the new // setreuid(). Based on its comments, it purports to set the svuid to the new
@ -45,8 +45,8 @@ void DropPrivileges() {
// is different from the desired euid. The workaround of calling setuid() or // is different from the desired euid. The workaround of calling setuid() or
// seteuid() before setreuid() works because it sets the euid so that by the // seteuid() before setreuid() works because it sets the euid so that by the
// time setreuid() runs, the old euid is actually the value that ought to be // time setreuid() runs, the old euid is actually the value that ought to be
// set as the svuid. setregid() is similar. This bug is filed as radar // set as the svuid. setregid() is similar. This bug was reported as radar
// 18987552. // 18987552, fixed in 10.10.3 and security updates to 10.9.5 and 10.8.5.
// //
// setuid() and setgid() alone will only set the saved IDs when running as // setuid() and setgid() alone will only set the saved IDs when running as
// root. When running a setuid non-root or setgid program, they do not alter // root. When running a setuid non-root or setgid program, they do not alter

View File

@ -21,12 +21,12 @@
namespace crashpad { namespace crashpad {
//! \brief Inserts a mapping from \a key to \a value into \a map, or replaces //! \brief Inserts a mapping from \a key to \a value into \a map, or replaces
//! an existing mapping so that \a key maps to \value. //! an existing mapping so that \a key maps to \a value.
//! //!
//! This behaves similarly to `std::map<>::insert_or_assign()` proposed for //! This behaves similarly to `std::map<>::%insert_or_assign()` proposed for
//! C++17, except that the \a old_value parameter is added. //! C++17, except that the \a old_value parameter is added.
//! //!
//! \param[inout] map The map to operate on. //! \param[in,out] map The map to operate on.
//! \param[in] key The key that should be mapped to \a value. //! \param[in] key The key that should be mapped to \a value.
//! \param[in] value The value that \a key should map to. //! \param[in] value The value that \a key should map to.
//! \param[out] old_value If \a key was previously present in \a map, this will //! \param[out] old_value If \a key was previously present in \a map, this will

View File

@ -32,21 +32,22 @@ bool SplitStringFirst(const std::string& string,
return true; return true;
} }
std::vector<std::string> SplitString(const std::string& str, char delimiter) { std::vector<std::string> SplitString(const std::string& string,
char delimiter) {
std::vector<std::string> result; std::vector<std::string> result;
if (str.empty()) if (string.empty())
return result; return result;
size_t start = 0; size_t start = 0;
while (start != std::string::npos) { while (start != std::string::npos) {
size_t end = str.find_first_of(delimiter, start); size_t end = string.find_first_of(delimiter, start);
std::string part; std::string part;
if (end == std::string::npos) { if (end == std::string::npos) {
part = str.substr(start); part = string.substr(start);
start = std::string::npos; start = std::string::npos;
} else { } else {
part = str.substr(start, end - start); part = string.substr(start, end - start);
start = end + 1; start = end + 1;
} }

View File

@ -30,7 +30,7 @@ namespace crashpad {
//! character. //! character.
//! //!
//! \return `true` if \a string was split successfully. `false` if \a string //! \return `true` if \a string was split successfully. `false` if \a string
//! did not contain a \delimiter character or began with a \delimiter //! did not contain a \a delimiter character or began with a \a delimiter
//! character. //! character.
bool SplitStringFirst(const std::string& string, bool SplitStringFirst(const std::string& string,
char delimiter, char delimiter,
@ -41,8 +41,9 @@ bool SplitStringFirst(const std::string& string,
//! //!
//! \param[in] string The string to split. //! \param[in] string The string to split.
//! \param[in] delimiter The delimiter to split at. //! \param[in] delimiter The delimiter to split at.
//!
//! \return The individual parts of the string. //! \return The individual parts of the string.
std::vector<std::string> SplitString(const std::string& str, char delimiter); std::vector<std::string> SplitString(const std::string& string, char delimiter);
} // namespace crashpad } // namespace crashpad

View File

@ -29,7 +29,7 @@ namespace crashpad {
//! non-empty, a space will precede \a argument. //! non-empty, a space will precede \a argument.
//! //!
//! \param[in] argument The argument to append to \a command_line. //! \param[in] argument The argument to append to \a command_line.
//! \param[inout] command_line The command line being constructed. //! \param[in,out] command_line The command line being constructed.
void AppendCommandLineArgument(const std::wstring& argument, void AppendCommandLineArgument(const std::wstring& argument,
std::wstring* command_line); std::wstring* command_line);