forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch
99 lines (96 loc) · 3.21 KB
/
0019-Add-a-README.md-with-notes-on-what-is-left-to-do.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From 021a9372d791c8620c30ad841ce293ac8d505ac4 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <[email protected]>
Date: Wed, 5 Feb 2014 13:44:28 +0000
Subject: [PATCH 19/24] Add a README.md with notes on what is left to do
Signed-off-by: Jon TURNEY <[email protected]>
---
README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6ce8836
--- /dev/null
+++ b/README.md
@@ -0,0 +1,79 @@
+# Breakpad for Cygwin/MinGW
+
+google-breakpad with support added for PE/COFF executables with DWARF debugging
+information, as used by Cygwin/MinGW
+
+## Compiling
+
+See README
+
+````
+./configure && make
+````
+
+will produce dump\_syms, minidump\_dump, minidump\_stackwalk, libbreakpad.a
+and for MinGW libcrash\_generation_client.a, libcrash\_generation_server.a, crash\_generation_app.exe
+
+Note that since git-svn ignores svn externals, this repository is missing the
+gyp and gtest dependencies.
+
+## Using
+
+See http://code.google.com/p/google-breakpad/wiki/GettingStartedWithBreakpad
+
+### Producing and installing symbols
+
+````
+dump_syms crash_generation_app.exe >crash_generation_app.sym
+FILE=`head -1 crash_generation_app.sym | cut -f5 -d' '`
+BUILDID=`head -1 crash_generation_app.sym | cut -f4 -d' '`
+SYMBOLPATH=/symbols/${FILE}/${BUILDID}/
+mdir -p ${SYMBOLPATH}
+mv crash_generation_app.sym ${SYMBOLPATH}
+````
+
+### Generating a minidump file
+
+A small test application demonstrating out-of-process dumping called
+crash\_generation\_app.exe is built.
+
+- Run it once, selecting "Server->Start" from the menu
+- Run it again, selecting "Client->Deref zero"
+- Client should crash, and a .dmp is written to C:\Dumps\
+
+### Processing the minidump to produce a stack trace
+
+````
+minidump_stackwalk blah.dmp /symbols/
+````
+
+## Issues
+
+### Lack of build-id
+
+Executables produced by Cygwin/MinGW gcc do not currently contain a build-id.
+On Windows, this build-id takes the form of a CodeView record.
+
+This build-id is captured for all modules in the process by MiniDumpWriteDump(),
+and is used by the breakpad minidump processing tools to find the matching
+symbol file.
+
+See http://debuginfo.com/articles/debuginfomatch.html
+
+I have implemented 'ld --build-id' for PE/COFF executables (See
+https://sourceware.org/ml/binutils/2014-01/msg00296.html), but you must use
+sufficently recent binutils and build with '-Wl,--build-id' (or a gcc configured
+'--enable-linker-build-id' which turns that flag on by defualt) to enable that.
+
+A tool could be written to add a build-id to existing PE/COFF executables, but in
+practice this turns out to be quite tricky...
+
+### Symbols from a PDB or the Microsoft Symbol Server
+
+<a href="http://hg.mozilla.org/users/tmielczarek_mozilla.com/fetch-win32-symbols">
+symsrv_convert</a> and dump_syms for PDB cannot be currently built with MinGW,
+because they require the MS DIA (Debug Interface Access) SDK (which is only in
+paid editions of Visual Studio) and the DIA SDK uses ATL.
+
+An alternate PDB parser is available at https://github.com/luser/dump_syms, but
+that also needs some work before it can be built with MinGW.
--
2.1.1