利用dwarfdump命令和dsym文件链接binary image,查看crash log中...
首先需要打包的dsym文件,然后在终端中输入命令:
1
|
$ dwarfdump --lookup=ADDRESS --arch=ARCH {MyApp.app.dsym}
|
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
NAME
dwarfdump -- dump DWARF debug information.
SYNOPSIS
dwarfdump [options] file1 file2 ...
DESCRIPTION
For each operand that names a mach-o or 32 bit ELF
file
, dwarfdump
disassembles the DWARF data found within the
file
. Only the .debug_info
section is disassembled unless one of the --debug-XXXX or --all options
are specified.
The following options are available:
-a, --all
Dump disassembly of all DWARF sections -- by default only the
.debug_info section is disassembled, or individual sections can be
specified by using the --debug-XXXX options.
--arch=ARCH
Dump DWARF debug information
for
the specified CPU architecture.
Architectures may be specified by name or by number. This option
can be specified multiple
times
, once
for
each desired
architecture. All architectures will be disassembled by default.
-c, --show-children
Show a DIE's children when using the --debug-info=OFFSET, --
find
,
and --name options.
--eh-frame[=SECTION]
Dump exception handling frame information from the optional SECTION
parameter. The __eh_frame section will be dumped by default.
-e, --english
Print dwarf tags and attributes
in
a
more
readable
format
instead
of using the DWARF TAG_ and AT_ definitions.
--
file
-stats[=size]
Show
file
composition statistics
for
any input files. Each
file
's
contents are analyzed and broken down into byte counts
for
the
following categories: symbol table, string table, text and code,
DWARF debug information, STABS debug information, and other. When
multiple files are specified, byte count totals
for
each category
will be displayed at the end of the table. Specify the optional
'size'
argument to show all byte count results using unit suffixes:
Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. This
option can be useful
in
tracking the size and makeup of mach-o
binary files, and also allows easy comparison between DWARF and
STABS built binaries and related object files.
-f PATTERN, --
find
=PATTERN
Search
for
the exact text PATTERN
in
the .debug_pubnames section
and print the matching debug information entries. Use the --regex
option to have PATTERN become a regular expression
for
more
flexible pattern matching.
When there is no .debug_pubnames section or the name of the DIE you
are looking
for
is not found
in
the .debug_pubnames section, try
using the slower but
more
complete --name option.
-F, --show-form
Show DWARF form types after the DWARF attribute types.
-h, -?, --help
Show help and usage
for
this
command
.
-i, --ignore-
case
Ignore
case
distinctions
in
when finding by name using
strings
or
regular expressions.
-n PATTERN, --name=PATTERN
Find and print all DIE entries whose name (DW_AT_name attribute)
matches the exact text
in
PATTERN. Use the --regex option to
have PATTERN become a regular expression
for
more
flexible pattern
matching.
--lookup=ADDRESS
Lookup ADDRESS
in
the debug information and print out any available
file
,
function
, block and line table details.
-o PATH, --out-
file
=PATH
Redirect output to a
file
specified by PATH.
-p, --show-parents
Show a DIE's parents when using the --debug-info=OFFSET, --
find
,
and --name options.
-r N, --recurse-depth=N
Only recurse to a child depth of N when displaying the DWARF
information.
-u, --uuid
Show the UUID
for
each architecture.
-x, --regex
Treat any PATTERN
strings
as regular expressions when searching
instead of just as an exact string match.
-
v
, --verbose
Display verbose information when dumping. This can help to debug
DWARF issues.
--verify
Verify the structure of the DWARF information by verifying the
compile unit chains, die relationships graph, and address ranges.
--version
Display the current version and build
date
of the dwarfdump binary.
--debug-abbrev
--debug-aranges
--debug-frame[=OFFSET]
--debug-info[=OFFSET]
--debug-inlined
--debug-line[=OFFSET]
--debug-macinfo[=OFFSET]
--debug-pubnames[=PATTERN]
--debug-pubtypes[=PATTERN]
--debug-str
--apple-names[=PATTERN]
--apple-types[=PATTERN]
--apple-namespaces[=PATTERN]
--apple-objc[=PATTERN]
Dump the specified DWARF section by name. Only the .debug_info
section is disassembled by default. Some entries support adding a
'=OFFSET'
as a way to provide an optional offset of the exact entry
to dump within the respective section. When an OFFSET is provided,
only the entry at that offset will be dumped,
else
the entire
section will be dumped. Some options support an optional
'=PATTERN'
parameter that will search the section
for
an entry with a matching
name. Children of items at OFFSETs can be dumped by also using the
--show-children option where applicable.
|