| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces 3 helper functions: error(), warn() and note() to
make printing during verification more consistent. When supported, the
respective prefixes are printed in color using the same color scheme as
clang.
Differential revision: https://reviews.llvm.org/D38368
llvm-svn: 314498
|
|
|
|
| |
llvm-svn: 314481
|
|
|
|
| |
llvm-svn: 314479
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the dwarfdump option --find=<name>. This option
looks for a DIE in the accelerator tables and dumps it if found. This
initial patch only adds support for .apple_names to keep the review
small, adding the other sections and pubnames support should be
trivial though.
Differential Revision: https://reviews.llvm.org/D38282
llvm-svn: 314439
|
|
|
|
|
|
|
|
|
| |
This patch adds a check to the DWARF verifier to detect CUs without a
unit DIE.
Differential revision: https://reviews.llvm.org/D38363
llvm-svn: 314426
|
|
|
|
|
|
|
|
|
| |
Fixes 32-bit buildbots:
http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/542
http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11533
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/11494
llvm-svn: 314291
|
|
|
|
|
|
|
|
| |
This patch adds support for passing an offset to -debug-line.
Differential revision: https://reviews.llvm.org/D38240
llvm-svn: 314288
|
|
|
|
|
|
|
|
| |
This patch adds support for passing an offset to -debug-loc.
Differential revision: https://reviews.llvm.org/D38237
llvm-svn: 314286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dsymutil generates the companion file, its strips all unnecessary
sections by omitting their body and setting the offset in their
corresponding load command to zero.
One such section is the .eh_frame section, as it contains runtime
information rather than debug information and is part of the __TEXT
segment. When reading this section, we would just read the number of
bytes specified in the load command, starting from offset 0 (i.e. the
beginning of the file).
Rather than trying to parse this obviously invalid section, dwarfdump
now skips this.
Differential revision: https://reviews.llvm.org/D38135
llvm-svn: 314208
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds dumping of line table instructions as well as the final
state at each specified pc value in verbose mode. This is essentially
the same as the default in Darwin's dwarfdump. Dumping the actual line
table opcodes can be particularly useful for something like debugging a
bad `.debug_line` section.
Differential revision: https://reviews.llvm.org/D37971
llvm-svn: 313910
|
|
|
|
| |
llvm-svn: 313900
|
|
|
|
|
|
|
| |
This is a bit ugly because we can't put Optional into a union. Hide all
of that behind a set of accessors and make accesses safer using asserts.
llvm-svn: 313884
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the Darwin dwarfdump option --recurse-depth=<N>,
which limits the recursion depth when selectively printing DIEs at an
offset.
Differential Revision: https://reviews.llvm.org/D38064
llvm-svn: 313778
|
|
|
|
|
|
|
|
| |
When symbolizing large binaries, parsing every CU in a DWP file is a
significant performance penalty. Instead, use the index to only load the
CUs that are needed.
llvm-svn: 313659
|
|
|
|
|
|
|
|
|
|
|
| |
This speeds up dumping specific DIEs by not parsing abbreviations for
units that are not used.
(this is also handy to have in eventually to speed up llvm-symbolizer
for .dwp files, where parsing most of the DWP file can be avoided by
using the index)
llvm-svn: 313635
|
|
|
|
| |
llvm-svn: 313573
|
|
|
|
| |
llvm-svn: 313568
|
|
|
|
| |
llvm-svn: 313567
|
|
|
|
| |
llvm-svn: 313560
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes the `.eh_frame` extension an alias for `.debug_frame`.
Up till now it was only possible to dump the section using objdump, but
not with dwarfdump. Since the two are essentially interchangeable, we
dump whichever of the two is present.
As a workaround, this patch also adds parsing for 3 currently
unimplemented CFA instructions: `DW_CFA_def_cfa_expression`,
`DW_CFA_expression`, and `DW_CFA_val_expression`. Because I lack the
required knowledge, I just parse the fields without actually creating
the instructions.
Finally, this also fixes the typo in the `.debug_frame` section name
which incorrectly contained a trailing `s`.
Differential revision: https://reviews.llvm.org/D37852
llvm-svn: 313530
|
|
|
|
|
|
|
| |
This will print all children of a DIE when selectively printing only
one DIE at a given offset.
llvm-svn: 313464
|
|
|
|
| |
llvm-svn: 313463
|
|
|
|
|
|
|
|
|
| |
This is the first of many commits that enable selectively dumping just
one record from the debug info.
This reapplies r313412 with some extra qualification to appease GCC and MSVC.
llvm-svn: 313419
|
|
|
|
|
|
| |
This reverts commit r313412 because of a g++ incompatibility.
llvm-svn: 313413
|
|
|
|
|
|
|
| |
This is the first of many commits that enable selectively dumping just
one record from the debug info.
llvm-svn: 313412
|
|
|
|
| |
llvm-svn: 313370
|
|
|
|
|
|
| |
Fixes heap buffer overflow triggered in DWARF verifier, detected by ASAN.
llvm-svn: 313280
|
|
|
|
| |
llvm-svn: 313272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch started as an attempt to rebase Greg's differential (D32821).
The result is both quite similar and different at the same time. It adds
the following checks:
- Verify that all address ranges in a DIE are valid.
- Verify that no ranges within the DIE overlap.
- Verify that no ranges overlap with the ranges of a sibling.
- Verify that children are completely contained in its (direct)
parent's address range. (unless both are subprograms)
Differential revision: https://reviews.llvm.org/D37696
llvm-svn: 313255
|
|
|
|
|
|
| |
This reverts commit r313250.
llvm-svn: 313253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch started as an attempt to rebase Greg's differential (D32821).
The result is both quite similar and different at the same time. It adds
the following checks:
- Verify that all address ranges in a DIE are valid.
- Verify that no ranges within the DIE overlap.
- Verify that no ranges overlap with the ranges of a sibling.
- Verify that children are completely contained in its (direct)
parent's address range. (unless both are subprograms)
Differential revision: https://reviews.llvm.org/D37696
llvm-svn: 313250
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since users typically don't really care about the .dwo / non.dwo
distinction, this patch makes it so dwarfdump --debug-<info,...> dumps
.debug_info and (if available) also .debug_info.dwo. This simplifies
the command line interface (I've removed all dwo-specific dump
options) and makes the tool friendlier to use.
Differential Revision: https://reviews.llvm.org/D37771
llvm-svn: 313207
|
|
|
|
|
|
|
| |
This is a feature supported by Darwin dwarfdump. UUIDs are used to
associate executables with their .dSYM bundles.
llvm-svn: 313165
|
|
|
|
|
|
|
|
|
|
|
| |
This patches renames "brief" to "verbose" in de DIDumpOptions and
inverts the logic to match the new behavior where brief is the default.
Changing the default value uncovered some bugs related to the
DIDumpOptions not being propagated and have been fixed as well.
Differential revision: https://reviews.llvm.org/D37745
llvm-svn: 313139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev in
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117301.html
this changes the command line interface of llvm-dwarfdump to match the
one used by the dwarfdump utility shipping on macOS. In addition to
being shorter to type this format also has the advantage of allowing
more than one section to be specified at the same time.
In a nutshell, with this change
$ llvm-dwarfdump --debug-dump=info
$ llvm-dwarfdump --debug-dump=apple-objc
becomes
$ dwarfdump --debug-info --apple-objc
Differential Revision: https://reviews.llvm.org/D37714
llvm-svn: 312970
|
|
|
|
|
|
|
|
|
|
| |
This patch adds prologue verification, which is already present in
Apple's dwarfdump. It checks for invalid directory indices and warns
about duplicate file paths.
Differential revision: https://reviews.llvm.org/D37511
llvm-svn: 312782
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
range lists.
It solves issue of wrong section index evaluating for ranges when
base address is used.
Based on David Blaikie's patch D36097.
Differential revision: https://reviews.llvm.org/D37214
llvm-svn: 312477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Based on Fred's patch here: https://reviews.llvm.org/D6771
I can't seem to commandeer the old review, so I'm creating a new one.
With that change the locations exrpessions are pretty printed inline in the
DIE tree. The output looks like this for debug_loc entries:
DW_AT_location [DW_FORM_data4] (0x00000000
0x0000000000000001 - 0x000000000000000b: DW_OP_consts +3
0x000000000000000b - 0x0000000000000012: DW_OP_consts +7
0x0000000000000012 - 0x000000000000001b: DW_OP_reg0 RAX, DW_OP_piece 0x4
0x000000000000001b - 0x0000000000000024: DW_OP_breg5 RDI+0)
And like this for debug_loc.dwo entries:
DW_AT_location [DW_FORM_sec_offset] (0x00000000
Addr idx 2 (w/ length 190): DW_OP_consts +0, DW_OP_stack_value
Addr idx 3 (w/ length 23): DW_OP_reg0 RAX, DW_OP_piece 0x4)
Simple locations without ranges are printed inline:
DW_AT_location [DW_FORM_block1] (DW_OP_reg4 RSI, DW_OP_piece 0x4, DW_OP_bit_piece 0x20 0x0)
The debug_loc(.dwo) dumping in changed accordingly to factor the code.
Reviewers: dblaikie, aprantl, friss
Subscribers: mgorny, javed.absar, hiraditya, llvm-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D37123
llvm-svn: 312042
|
|
|
|
|
|
| |
This reverts commit r311492.
llvm-svn: 311499
|
|
|
|
|
|
|
| |
This patch adds printing for DW_AT_type DIEs like it's currently already
the case for DW_AT_specification DIEs.
llvm-svn: 311492
|
|
|
|
|
|
| |
No functionality change intended.
llvm-svn: 311288
|
|
|
|
|
|
|
|
|
| |
This patch hides the .debug_str offset and DIE reference offsets into
the CU when llvm-dwarfdump is invoked with -brief.
Differential Revision: https://reviews.llvm.org/D36835
llvm-svn: 311201
|
|
|
|
| |
llvm-svn: 311026
|
|
|
|
|
|
|
| |
Now MIPS one is unhappy:
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/2221
llvm-svn: 310928
|
|
|
|
|
|
|
|
|
|
|
| |
As was requested in D36313 thread,
with this patch section names and uniqueness calculated once,
and not every time when a range is dumped.
Differential revision: https://reviews.llvm.org/D36740
llvm-svn: 310923
|
|
|
|
|
|
|
|
|
| |
Teaches llvm-dwarfdump to print section index and name of range
when it dumps .debug_info.
Differential revision: https://reviews.llvm.org/D36313
llvm-svn: 310915
|
|
|
|
| |
llvm-svn: 310267
|
|
|
|
|
|
|
|
|
|
|
| |
These lead to tests failing spuriously as the values after being rendered to a
string were incorrect.
Reviewers: clayborg
Differential Revision: https://reviews.llvm.org/D36319
llvm-svn: 310262
|
|
|
|
| |
llvm-svn: 310253
|
|
|
|
|
|
|
|
|
| |
Followup to r309570, fixing it slightly differently (ranges_base and
addr_base should never be read from a DWO file - so there shouldn't be
any issue with 'overriding' the values - conditionalize the code and
assert that the values aren't being overriden).
llvm-svn: 309879
|