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

Side by Side Diff: docs/windows_client_integration.md

Issue 2103273003: docs: clean up markdown Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« docs/client_design.md ('K') | « docs/symbol_files.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Windows Integration overview 1 # Windows Integration overview
2 2
3 ## Windows Client Code 3 ## Windows Client Code
4 4
5 The Windows client code is in the `src/client/windows` directory of the tree. 5 The Windows client code is in the [client/windows/](/src/client/windows/)
6 Since the header files are fairly well commented some specifics are purposely 6 directory of the tree. Since the header files are fairly well commented some
7 omitted from this document. 7 specifics are purposely omitted from this document.
8 8
9 ## Integration of minidump-generation 9 ## Integration of minidump-generation
10 10
11 Once you build the solution inside `src/client/windows`, an output file of 11 Once you build the solution inside [client/windows/](/src/client/windows/),
12 `exception_handler.lib` will be generated. You can either check this into your 12 an output file of `exception_handler.lib` will be generated. You can either
13 project's directory or build directly from the source, as the project itself 13 check this into your project's directory or build directly from the source, as
14 does. 14 the project itself does.
15 15
16 Enabling Breakpad in your application requires you to `#include 16 Enabling Breakpad in your application requires you to `#include
17 "exception_handler.h"` and instantiate the `ExceptionHandler` object like so: 17 "exception_handler.h"` and instantiate the `ExceptionHandler` object like so:
18 18
19 ``` 19 ```
20 handler = new ExceptionHandler(const wstring& dump_path, 20 handler = new ExceptionHandler(const wstring& dump_path,
21 FilterCallback fil ter, 21 FilterCallback filter,
22 MinidumpCallback c allback, 22 MinidumpCallback callback,
23 void* callback_con text, 23 void* callback_context,
24 int handler_types, 24 int handler_types,
25 MINIDUMP_TYPE dump _type, 25 MINIDUMP_TYPE dump_type,
26 const wchar_t* pip e_name, 26 const wchar_t* pipe_name,
27 const CustomClient Info* custom_info); 27 const CustomClientInfo* custom_info);
28 ``` 28 ```
29 29
30 The parameters, in order, are: 30 The parameters, in order, are:
31 31
32 * pathname for minidumps to be written to - this is ignored if OOP dump 32 * pathname for minidumps to be written to - this is ignored if OOP dump
33 generation is used 33 generation is used
34 * A callback that is called when the exception is first handled - you can 34 * A callback that is called when the exception is first handled - you can
35 return true/false here to continue/stop exception processing 35 return true/false here to continue/stop exception processing
36 * A callback that is called after minidumps have been written 36 * A callback that is called after minidumps have been written
37 * Context for the callbacks 37 * Context for the callbacks
38 * Which exceptions to handle - see `HandlerType` enumeration in 38 * Which exceptions to handle - see `HandlerType` enumeration in
39 exception\_handler.h 39 exception\_handler.h
40 * The type of minidump to generate, using the `MINIDUMP_TYPE` definitions in 40 * The type of minidump to generate, using the `MINIDUMP_TYPE` definitions in
41 `DbgHelp.h` 41 `DbgHelp.h`
42 * A pipe name that can be used to communicate with a crash generation server 42 * A pipe name that can be used to communicate with a crash generation server
43 * A pointer to a CustomClientInfo class that can be used to send custom data 43 * A pointer to a CustomClientInfo class that can be used to send custom data
44 along with the minidump when using OOP generation 44 along with the minidump when using OOP generation
45 45
46 You can also see `src/client/windows/tests/crash_generation_app/*` for a sample 46 You can also see the
47 app that uses OOP generation. 47 [crash_generation_app](/src/client/windows/tests/crash_generation_app/)
48 for a sample app that uses OOP generation.
48 49
49 ## OOP Minidump Generation 50 ## OOP Minidump Generation
50 51
51 For out of process minidump generation, more work is needed. If you look inside 52 For out of process minidump generation, more work is needed. If you look inside
52 `src/client/windows/crash_generation`, you will see a file called 53 [client/windows/crash_generation/](/src/client/windows/crash_generation/),
53 `crash_generation_server.h`. This file is the interface for a crash generation 54 you will see a file called
55 [crash_generation_server.h](/src/client/windows/crash_generation/crash_generatio n_server.h).
56 This file is the interface for a crash generation
54 server, which must be instantiated with the same pipe name that is passed to the 57 server, which must be instantiated with the same pipe name that is passed to the
55 client above. The logistics of running a separate process that instantiates the 58 client above. The logistics of running a separate process that instantiates the
56 crash generation server is left up to you, however. 59 crash generation server is left up to you, however.
57 60
58 ## Build process specifics(symbol generation, upload) 61 ## Build process specifics(symbol generation, upload)
59 62
60 The symbol creation step is talked about in the general overview doc, since it 63 The symbol creation step is talked about in the general overview doc, since it
61 doesn't vary much by platform. You'll need to make sure that the symbols are 64 doesn't vary much by platform. You'll need to make sure that the symbols are
62 available wherever minidumps are uploaded to for processing. 65 available wherever minidumps are uploaded to for processing.
63 66
64 ## Out in the field - uploading the minidump 67 ## Out in the field - uploading the minidump
65 68
66 Inside `src/client/windows/sender` is a class implementation called 69 Inside [client/windows/sender/](/src/client/windows/sender/) is a class
67 `CrashReportSender`. This class can be compiled into a separate standalone CLI 70 implementation called `CrashReportSender`. This class can be compiled into a
68 or in the crash generation server and used to upload the report; it can know 71 separate standalone CLI or in the crash generation server and used to upload
69 when to do so via one of the callbacks provided by the `CrashGenerationServer` 72 the report; it can know when to do so via one of the callbacks provided by the
70 or the `ExceptionHandler` object for in-process generation. 73 `CrashGenerationServer` or the `ExceptionHandler` object for in-process generati on.
OLDNEW
« docs/client_design.md ('K') | « docs/symbol_files.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698