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

Unified Diff: third_party/crashpad/crashpad/client/crashpad_client.h

Issue 1921833002: Update Crashpad to 00d458adaf3868999eeab5341fce5bedb81d17a1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fixes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/crashpad/crashpad/DEPS ('k') | third_party/crashpad/crashpad/client/crashpad_client_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/crashpad/crashpad/client/crashpad_client.h
diff --git a/third_party/crashpad/crashpad/client/crashpad_client.h b/third_party/crashpad/crashpad/client/crashpad_client.h
index 28a87a3ee05d8ddf62a1931e7cfc34977df73ca2..61338a3c5f72a30a0702cfe05dcaff53e10ed768 100644
--- a/third_party/crashpad/crashpad/client/crashpad_client.h
+++ b/third_party/crashpad/crashpad/client/crashpad_client.h
@@ -19,6 +19,8 @@
#include <string>
#include <vector>
+#include <stdint.h>
+
#include "base/files/file_path.h"
#include "base/macros.h"
#include "build/build_config.h"
@@ -152,6 +154,41 @@ class CrashpadClient {
//! \param[in] exception_pointers An `EXCEPTION_POINTERS`, as would generally
//! passed to an unhandled exception filter.
static void DumpAndCrash(EXCEPTION_POINTERS* exception_pointers);
+
+ //! \brief Requests that the handler capture a dump of a different process.
+ //!
+ //! The target process must be an already-registered Crashpad client. An
+ //! exception will be triggered in the target process, and the regular dump
+ //! mechanism used. This function will block until the exception in the target
+ //! process has been handled by the Crashpad handler.
+ //!
+ //! This function is unavailable when running on Windows XP and will return
+ //! `false`.
+ //!
+ //! \param[in] process A `HANDLE` identifying the process to be dumped.
+ //! \param[in] blame_thread If non-null, a `HANDLE` valid in the caller's
+ //! process, referring to a thread in the target process. If this is
+ //! supplied, instead of the exception referring to the location where the
+ //! exception was injected, an exception record will be fabricated that
+ //! refers to the current location of the given thread.
+ //! \param[in] exception_code If \a blame_thread is non-null, this will be
+ //! used as the exception code in the exception record.
+ //!
+ //! \return `true` if the exception was triggered successfully.
+ bool DumpAndCrashTargetProcess(HANDLE process,
+ HANDLE blame_thread,
+ DWORD exception_code) const;
+
+ enum : uint32_t {
+ //! \brief The exception code (roughly "Client called") used when
+ //! DumpAndCrashTargetProcess() triggers an exception in a target
+ //! process.
+ //!
+ //! \note This value does not have any bits of the top nibble set, to avoid
+ //! confusion with real exception codes which tend to have those bits
+ //! set.
+ kTriggeredExceptionCode = 0xcca11ed,
+ };
#endif
//! \brief Configures the process to direct its crashes to a Crashpad handler.
« no previous file with comments | « third_party/crashpad/crashpad/DEPS ('k') | third_party/crashpad/crashpad/client/crashpad_client_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698