Commit Graph

332 Commits

Author SHA1 Message Date
Alexey Samsonov
f64edf8d80 Update tests for DWARF parser: store sources next to pre-built object files and provide build instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 14:34:33 +00:00
Eli Bendersky
bfa18fdfbf Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 22:34:46 +00:00
Eli Bendersky
f91b23c8cd Add a comment to the test that points to the source from which the input object
file was generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 22:17:40 +00:00
Eli Bendersky
62b055fd50 Add a test for checking the current .debug_frame dumping capability.
The test is a binary placed in test/DebugInfo/Inputs, with a source C
file used for reference/reproducing. The source's first line is a clang
build command for reproducing the binary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174543 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:55:06 +00:00
Manman Ren
9c5861fdbd Attempt to recover gdb bot after r174445.
Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:59:41 +00:00
Manman Ren
43213cf1ac Dwarf: support for LTO where a single object file can have multiple line tables
We generate one line table for each compilation unit in the object file.
Reviewed by Eric and Kevin.

rdar://problem/13067005


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174445 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:52:47 +00:00
Eric Christopher
19c3364728 Add support for testing the output of the abbrev table for the
skeleton CU as part of the DWARF5 split dwarf proposal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 07:32:00 +00:00
Eric Christopher
208cc6f489 Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 07:31:55 +00:00
Tim Northover
4f12e53f4a Update debugging test for change in expected metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174321 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 12:15:00 +00:00
David Blaikie
f839eed5ea [DebugInfo] remove more node indirection (this time from the subprogram's variable lists)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 05:56:36 +00:00
David Blaikie
a8eefc7cc7 Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174266 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 05:56:24 +00:00
Manman Ren
a0bbe40380 Removing ssp and uwtable from the testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174259 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 01:34:38 +00:00
Manman Ren
945e828003 [Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 23:54:37 +00:00
Tim Northover
7bc8414ee9 Add explicit triples to AArch64 tests
Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174170 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 11:40:47 +00:00
Tim Northover
72062f5744 Add AArch64 as an experimental target.
This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 12:12:40 +00:00
David Blaikie
aaf2e639ec Support artificial parameters in function types.
Provides the functionality for Clang change r172911 - I just had this still
lying around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173820 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 19:35:24 +00:00
David Blaikie
ff715b2403 PR14566: Debug Info: Removing top level lexical blocks
This adds support for LLVM to accept metadata that doesn't include a top level
lexical block in a function. Specifically LLVM couldn't handle this when there
were file changes relating to these blocks. I've updated a few test cases to
ensure other functionality (such as inlining) isn't affected by this change, but
haven't pervasively updated all the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 21:55:23 +00:00
Andrew Kaylor
e27a787760 Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 00:28:05 +00:00
Andrew Kaylor
ee7c0d2f93 Add support for applying in-memory relocations to the .debug_line section and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 22:50:58 +00:00
Eli Bendersky
a3262988cf Add back a RUN line removed by mistake by a previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:58:09 +00:00
Eli Bendersky
767295f114 Now that llvm-dwarfdump supports flags to specify which DWARF section to dump,
use them in tests that run llvm-dwarfdump. This is in order to make tests as
specific as possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:44:53 +00:00
Eli Bendersky
939a4e8b69 Add command-line flags for DWARF dumping.
Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:26:43 +00:00
David Blaikie
1426841672 The last of PR14471 - emission of constant floats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-20 01:18:01 +00:00
David Blaikie
fe07db323b Fix a latent bug exposed by recent static member debug info changes.
We weren't encoding boolean constants correctly due to modeling boolean as a
signed type & then sign extending an i1 up to a byte & getting 255.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172926 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-19 23:00:25 +00:00
Eric Christopher
0969ddf601 Split out DW_OP_addr for the split debug info DWARF5 proposal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18 22:11:33 +00:00
Eric Christopher
446b88fb81 Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this by
changing both the string of the dwo_name to be correct and the type of
the statement list.

Testcases all around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172699 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-17 03:00:04 +00:00
Eric Christopher
d96c72a14c Add the DW_AT_GNU_addr_base for the skeleton cu. Add support for
emitting the dwarf32 version of DW_FORM_sec_offset and correct
disassembler support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-17 02:59:59 +00:00
Eric Christopher
4f3b323f8d Make this test X86 only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 20:31:35 +00:00
Eric Christopher
65605d85bd Move this to X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172651 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 20:31:32 +00:00
Eric Christopher
2c2bcbdd5b Add testcase missed yesterday from Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172646 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 19:53:47 +00:00
Eric Christopher
72f7bfbf0e Split address information for DWARF5 split dwarf proposal. This involves
using the DW_FORM_GNU_addr_index and a separate .debug_addr section which
stays in the executable and is fully linked.

Sneak in two other small changes:

a) Print out the debug_str_offsets.dwo section.
b) Change form we're expecting the entries in the debug_str_offsets.dwo
   section to take from ULEB128 to U32.

Add tests for all of this in the fission-cu.ll test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172578 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-15 23:56:56 +00:00
Eric Christopher
ef24963cbc Add the C testcase to this file.
Suggested by Dave Blaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08 03:03:14 +00:00
Eric Christopher
9a1e0e252a Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08 01:53:52 +00:00
David Blaikie
0fecdfb7c4 Mark artificial types as such in the annotated debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08 00:31:02 +00:00
Eric Christopher
dd8e9f395e Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp,
but in all dwo files they're accessed now via DW_FORM_GNU_str_index.

Add support for dumping these sections and modify the fission-cu.ll
testcase to have the correct strings and form. Fix a small bug
in the fixed form sizes routine that involved out of array accesses
for the table and add a FIXME in the extractFast routine to fix
this up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 19:32:41 +00:00
David Blaikie
50601e4af1 Make test/DebugInfo/member-pointers.ll portable by removing the TargetData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171759 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 17:52:49 +00:00
David Blaikie
62fdfb5fa7 PR14759: Debug info support for C++ member pointers.
This works fine with GDB for member variable pointers, but GDB's support for
member function pointers seems to be quite unrelated to
DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 05:51:15 +00:00
David Blaikie
e302b6cb69 Include access modifiers in subprogram metadata IR comment.
Based on code review feedback in r171604 from Chandler Carruth &
Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 21:39:33 +00:00
David Blaikie
00ece1b846 Emit DW_TAG_formal_parameter for unnamed parameters.
This change essentially reverts r87069 which came without a test case. It
causes no regressions in the GDB 7.5 test suite & fixes 25 xfails (commit
to the test suite to follow). If anyone can present a test case that
demonstrates why this check is necessary I'd be happy to account for it in one
way or another.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 07:43:02 +00:00
Eric Christopher
8cab6edf4f Add a name for the anonymous type we're creating for subrange
types and a FIXME for what we should be doing. Should solve the
immediacy of PR12069 where our debug info is crashing another
tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 21:51:53 +00:00
Eric Christopher
82de10a34c Extend the dumping infrastructure to deal with additional
sections for debug info. These are some of the dwo sections from the
DWARF5 split debug info proposal. Update the fission-cu.ll testcase
to show what we should be able to dump more of now.

Work in progress: Ultimately the relocations will be gone for the
dwo section and the strings will be a different form (as well as
the rest of the sections will be included).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 23:52:13 +00:00
Eric Christopher
64f824c9d1 For the dwarf5 split debug info code split out the string section
per compile unit/skeleton compile unit. Update tests accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171133 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 02:14:01 +00:00
Eric Christopher
d84aa00c7c FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171132 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 02:13:58 +00:00
Eric Christopher
5211876288 FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 02:13:55 +00:00
Eric Christopher
32b3768ec1 Right now all of the relocations are 32-bit dwarf, and the relocation
information doesn't return an addend for Rel relocations. Go ahead
and use this information to fix relocation handling inside dwarfdump
for 32-bit ELF REL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171126 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 01:07:07 +00:00
Eric Christopher
71a9c2137b Move these files over to the debug info directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170810 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21 00:03:42 +00:00
Eric Christopher
6eebe47060 Split out abbreviations for the skeleton info from the rest of
the abbreviations. Part of implementing split dwarf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170589 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19 22:02:53 +00:00
Eric Christopher
6c583141bf Add support for passing -main-file-name all the way through to
the assembler.

Part of PR14624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170390 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 00:31:01 +00:00
David Blaikie
01bc2b39a4 Debug Info: add support to mark member variables as artificial
This is the LLVM portion of r170154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170156 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13 22:43:07 +00:00
Eric Christopher
0e3e9b79f6 Refactor out the abbreviation handling into a separate class that
controls each of the abbreviation sets (only a single one at the
moment) and computes offsets separately as well for each set
of DIEs.

No real function change, ordering of abbreviations for the skeleton
CU changed but only because we're computing in a separate order. Fix
the testcase not to care.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169793 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-10 23:34:43 +00:00