Commit Graph

22 Commits

Author SHA1 Message Date
NAKAMURA Takumi
76614e7991 Remove "REQUIRES:shell" from tests. They work for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221269 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 13:41:33 +00:00
Frederic Riss
cc55b73867 Allow DWARFDebugInfoEntryMinimal::getSubroutineName to resolve cross-unit references.
Summary: getSubroutineName is currently only used by llvm-symbolizer, thus add a binary test containing a cross-cu inlining example.

Reviewers: samsonov, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5394

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218245 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-22 12:35:53 +00:00
David Blaikie
9e4e3d057f Omit DW_TAG_subprograms for subprograms without inlined subroutines when producing -gmlt data
To reduce the size of -gmlt data, skip the subprograms without any
inlined subroutines. Since we've now got the ability to make these
determinations in the backend (funnily enough - we added the flag so we
wouldn't produce ranges under -gmlt, but with this change we use the
flag, but go back to producing ranges under -gmlt).

Instead, just produce CU ranges to inform the consumer which parts of
the code are described by this CU's line table. Tools could inspect the
line table directly to compute the range, but the CU ranges only seem to
be about 0.5% of object/executable size, so I'm not too worried about
teaching llvm-symbolizer that trick just yet - it's certainly a possible
piece of future work.

Update an llvm-symbolizer test just to demonstrate that this schema is
acceptable there (if it wasn't, the compiler-rt tests would catch this,
but good to have an in-llvm-tree test for llvm-symbolizer's behavior
here)

Building the clang binary with -gmlt with this patch reduces the total
size of object files by 5.1% (5.56% without ranges) without compression
and the executable by 4.37% (4.75% without ranges).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-19 17:03:16 +00:00
Alexey Samsonov
54543afeba [DWARF parser] Fix nasty memory corruption in .dwo files handling.
Forge a test case where llvm-symbolizer has to use external .dwo
file to produce the inlining information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217270 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 19:29:45 +00:00
Alexey Samsonov
740a75968a [DWARF parser] Fix broken address ranges construction.
Previous algorithm for constructing [Address ranges]->[Compile Units]
mapping was wrong. It somewhat relied on the assumption that address ranges
for different compile units may not overlap. It is not so.
For example, two compile units may contain the definition of the same
linkonce_odr function. These definitions will be merged at link-time,
resulting in equivalent .debug_ranges entries for both these units

Instead of sorting and merging original address ranges (from .debug_ranges
and .debug_aranges), implement a different approach: save endpoints
of all ranges, and then use a sweep-line approach to construct
the desired mapping. If we find that certain address maps to
several compilation units, we just pick any of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210860 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-12 23:58:49 +00:00
Alexey Samsonov
4dfa6812d7 [llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.
Turns out that DW_AT_ranges_base attribute sets the offset for
DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified
in the skeleton compile unit DIE in the main executable. This is extremely confusing,
and would hopefully be fixed in DWARF-5 when it's finalized. For now this
behavior makes sense, as otherwise Fission would break DWARF consumers who
doesn't know anything about DW_AT_ranges_base.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-12 18:52:35 +00:00
Alexey Samsonov
8ad418b61b Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209152 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19 18:45:32 +00:00
Alexey Samsonov
bf6e3f9257 [DWARF parser] Teach DIContext to fetch short (non-linkage) function names for a given address.
Change --functions option in llvm-symbolizer tool to accept
values "none", "short" or "linkage". Update the tests and docs
accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209050 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-17 00:07:48 +00:00
Alexey Samsonov
e0d2d7fb26 [llvm-symbolizer] Print file/line for a PC even if there is no DIE describing it.
This is important for symbolizing executables with debug info in
unavailable .dwo files. Even if all DIE entries are missing, we can
still symbolize an address: function name can be fetched from symbol table,
and file/line info can be fetched from line table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206665 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 22:22:44 +00:00
Alexey Samsonov
12c9f92bb1 llvm-symbolizer: use dynamic symbol table if the regular one is stripped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 13:10:01 +00:00
Ed Maste
22939fa0a4 llvm-symbolizer: make mangled name heuristic apply to all symbols
PR: http://llvm.org/pr18431
Review: http://llvm-reviews.chandlerc.com/D2552


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199404 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 17:25:12 +00:00
Alexey Samsonov
42c9ecb7a4 llvm-symbolizer: add --obj flag to specify a single object file that should be symbolized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-24 19:33:22 +00:00
Will Dietz
b7b1abef25 Add DebugInfo testcase for high_pc encoded as constant, fixed in r193555.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-30 20:27:17 +00:00
Alexey Samsonov
6889483ca4 llvm-symbolizer: add support for .gnu_debuglink section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188386 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 17:09:30 +00:00
NAKAMURA Takumi
d212db0cac llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" can be removed.
FIXME: Could we use llvm::sys::Path here?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 09:51:42 +00:00
Alexey Samsonov
8c6e3248e9 llvm-symbolizer: skip leading underscore in Mach-O symbol table entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 14:25:52 +00:00
Alexey Samsonov
8175bc3d3b llvm-symbolizer: add support for Mach-O universal binaries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185137 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 08:15:40 +00:00
Alexey Samsonov
888ca964a4 [llvm-symbolizer] Avoid calling slow getSymbolSize for Mach-O files. Assume that symbols with zero size are in fact large enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 07:57:38 +00:00
Alexey Samsonov
625b109916 Correct handling invalid filename in llvm-symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183102 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-03 14:12:39 +00:00
Chandler Carruth
58852ecc1f Simplify the quoting here. Our lit emulator doesn't deal well with the
nested quoting schemes, and they're not important here...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179014 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 10:07:50 +00:00
Alexey Samsonov
ef148afba8 llvm-symbolizer: correctly parse filenames given in quotes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 09:22:24 +00:00
Alexey Samsonov
1c4d286f5c Add a basic test for llvm-symbolizer tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178858 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 08:30:13 +00:00