15 Commits

Author SHA1 Message Date
Sigurdur Asgeirsson
30385d4e47 handler: Add user extensibility stream call-out.
Bug: crashpad:167
Test: Add crashpad_handler_test.
Change-Id: I79b0b71dc4f61e6dce6bc10083e2f924dc83c940
Reviewed-on: https://chromium-review.googlesource.com/463746
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-04-11 19:06:00 +00:00
Mark Mentovai
54048cfd78 Don’t suppress_wildcard crashpad.gyp:All on platforms where it works
This matches Chromium 01e379fac955.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1566763002 .
2016-01-06 12:37:01 -05:00
Scott Graham
6978bf7646 win: Crash handler server
This replaces the registration server, and adds dispatch to a delegate
on crash requests.

(As you are already aware) we went around in circles on trying to come
up with a slightly-too-fancy threading design. All of them seemed to
have problems when it comes to out of order events, and orderly
shutdown, so I've gone back to something not-too-fancy.

Two named pipe instances (that clients connect to) are created. These
are used only for registration (which should take <1ms), so 2 should be
sufficient to avoid any waits. When a client registers, we duplicate
an event to it, which is used to signal when it wants a dump taken.

The server registers threadpool waits on that event, and also on the
process handle (which will be signalled when the client process exits).
These requests (in particular the taking of the dump) are serviced
on the threadpool, which avoids us needing to manage those threads,
but still allows parallelism in taking dumps. On process termination,
we use an IO Completion Port to post a message back to the main thread
to request cleanup. This complexity is necessary so that we can
unregister the threadpool waits without being on the threadpool, which
we need to do synchronously so that we can be sure that no further
callbacks will execute (and expect to have the client data around
still).

In a followup, I will readd support for DumpWithoutCrashing -- I don't
think it will be too difficult now that we have an orderly way to
clean up client records in the server.

R=cpu@chromium.org, mark@chromium.org, jschuh@chromium.org
BUG=crashpad:1,crashpad:45

Review URL: https://codereview.chromium.org/1301853002 .
2015-09-03 11:06:17 -07:00
Erik Wright
9ff3d9335f Introduce RegistrationServer, which implements a Crashpad client registration protocol for Windows.
BUG=
R=cpu@chromium.org, scottmg@chromium.org

Review URL: https://codereview.chromium.org/1126783004
2015-05-26 14:31:04 -04:00
Mark Mentovai
332e8219ed Migrate content from wiki.
The wiki existed at https://code.google.com/p/crashpad/wiki, but given
Google Code Project Hosting’s impending shutdown[1], it’s prudent to
move wiki documents into the source code repository.

This change moves the existing contents of doc into doc/support, to make
way for documentation in doc. The two existing wiki pages, ProjectStatus
and DevelopingCrashpad, are converted to AsciiDoc format (a fairly
straightforward conversion) and checked in to doc. generate_asciidoc.sh
is updated to produce HTML output from these files. The generated HTML
will show up at http://docs.crashpad.googlecode.com/git/doc/. Note that
generated HTML is still hosted on Google Code Project Hosting, but it’ll
be easy to find a new home for them.

[1]
http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1055523002
2015-04-01 12:39:53 -04:00
Mark Mentovai
809ea8158d test: Move util/test to its own top-level directory, test.
After 9e79ea1da719, it no longer makes sense for crashpad_util_test_lib
to “hide” in util/util_test.gyp. All of util/test is moved to its own
top-level directory, test, which all other test code is allowed to
depend on. test, too, is allowed to depend on all other non-test code.

In a future change, when crashpad_util_test_lib gains a dependency on
crashpad_client, it won’t look so weird for something in util (even
though it’s in util/test) to depend on something in client, because the
thing that needs to depend on client will live in test, not util.

BUG=crashpad:33
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/1051533002
2015-03-31 17:44:14 -04:00
Mark Mentovai
9e79ea1da7 Split *_test.gyp from *.gyp.
In a future change, crashpad_util_test_lib will gain a dependency on
crashpad_client. This would violate GYP’s prohibition on circular
dependencies between .gyp files, although there would be no circular
relationship between the targets themselves. To overcome this problem,
all test-related targets are moved into their own first-class .gyp
files.

BUG=crashpad:33
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/1045173004
2015-03-31 17:06:28 -04:00
Mark Mentovai
c2502f45c9 doc: Add documentation-generating scripts to the Crashpad tree.
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1009223003
2015-03-18 17:10:12 -04:00
Mark Mentovai
588d7dba1c Add the crashpad_handler executable.
crashpad_handler is Crashpad’s exception handler server.

Currently, it runs a loop to receive exceptions, and exits when it no
longer has any clients. In the future, this will be extended to write
and potentially upload dumps.

The handler is expected to be started by its initial client via the
CrashpadClient interface.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/789693005
2014-12-30 14:23:47 -05:00
Mark Mentovai
7b2e7efcc2 Add the Snapshot interface.
These are all of the abstract base classes used in the Snapshot series,
discussed in the thread at
https://groups.google.com/a/chromium.org/d/topic/crashpad-dev/4pACgjhIz-I.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/597673004
2014-10-02 17:09:37 -04:00
Mark Mentovai
be5d0ab39c Add CaptureContext and its test.
TEST=client_test CaptureContextMac.CaptureContext
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/493563002
2014-08-20 18:30:19 -04:00
Mark Mentovai
0b7f86a650 Add on_demand_service_tool.
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/477353002
2014-08-20 15:18:55 -04:00
Mark Mentovai
995012534e Introduce MinidumpWritable, its dependencies, and their tests.
MinidumpWritable is the base class for all minidump-writing operations.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/432003005
2014-08-01 12:48:28 -04:00
Mark Mentovai
dfe81014f7 Add compat to Crashpad.
compat includes headers providing definitions normally provided by the
system, in cases where the system SDK does not always provide the
correct or up-to-date definitions, and cases where code on different
platforms needs to access definitions normally only available on one
platform.

To provide definitions on a single platform, where the system SDK may
not provide the definitions correctly, use subdirectories named for the
platform, such as “mac”.

To provide definitions normally available on only one platform to
others, use subdirectories that identify that they are to be used on
platforms other than the one that originated their definitions, such as
“non_win”.

In all cases, headers should be named as they are natively in their
respective SDKs, so that it’s possible to #include them according to
their usual names.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/432843002
2014-07-31 13:45:51 -04:00
Mark Mentovai
fbcd680b50 Initial commit of Crashpad.
This commit contains the basic structure of the project:
 - LICENSE and related files.
 - DEPS to check dependencies out into third_party.
 - README.crashpad files and .gyp files to accompany third_party
   dependencies.
 - Infrastructure to run GYP as a gclient hook.
 - codereview.settings to enable Rietveld code review.
 - Assorted other administrative and dot-files.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/426403002
2014-07-30 23:24:58 -04:00