Commit Graph

20 Commits

Author SHA1 Message Date
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
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
e7285c7279 Whitespace and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 22:40:48 +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
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
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
205e60b223 Add some basic support for the fission addr forms to DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168223 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 23:44:11 +00:00
Eric Christopher
d1726a4580 Rewrite DIContext interface to take an object. Update all callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167757 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 21:40:38 +00:00
Alexey Samsonov
4c0ae9066f Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167728 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 14:25:36 +00:00
Eric Christopher
806e03d238 Add a relocation visitor to lib object. This works via caching relocated
values in a map that can be passed to consumers. Add a testcase that
ensures this works for llvm-dwarfdump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167558 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-07 23:22:07 +00:00
Roman Divacky
5932429765 Stop casting away const qualifier needlessly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163258 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05 22:26:57 +00:00
Eric Christopher
3887a902a1 Add support for some missing DW_FORM_*.
TODO: Fix code duplication and coding style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162525 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 01:14:23 +00:00
Benjamin Kramer
e25a2bd2e3 Fix a C++11 UDL conflict.
Still not fixed in the standard ;)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154044 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-04 20:33:56 +00:00
Benjamin Kramer
5eccd36f1a Audited all the format strings in libDebugInfo and fixed those that didn't match the types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05 16:01:13 +00:00
Benjamin Kramer
41a964931a Add more PRI.64 macros for MSVC and use them throughout the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05 08:57:40 +00:00
Benjamin Kramer
34f864fd38 DWARF: wire up .debug_str dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 16:57:13 +00:00
Benjamin Kramer
89aedba562 DWARF: Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139774 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 03:11:09 +00:00
Benjamin Kramer
4aa3fea8b1 Style & indentation tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 21:47:32 +00:00
Benjamin Kramer
72c0d7fdd3 Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 19:42:23 +00:00