Matt Arsenault
a80a8422d5
Fix missing std::. Not sure how this compiles for anyone else.
...
llvm-svn: 177620
2013-03-21 00:57:21 +00:00
Rafael Espindola
c82c27dd5a
xlC doesn't like Header being both a type and a member variable. Rename the
...
member variable.
Patch by Kai <kai@redstar.de>
llvm-svn: 177575
2013-03-20 21:03:41 +00:00
Eli Bendersky
7859287ea6
Code cleanup: pass Offset by pointer to parseInstruction to more explicitly
...
convey that it's a INOUT argument.
Also, if parsing of entry instructions fails, don't push the entry.
llvm-svn: 175847
2013-02-22 00:50:48 +00:00
Eli Bendersky
1185958e53
Previously, parsing capability of the .debug_frame section was added
...
to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds
initial ability to parse and dump CFA instructions contained in
entries.
To keep it manageable, the patch omits some more advanced capabilities
(accounted in TODOs):
* Parsing of instructions with BLOCK arguments (expression lists)
* Dumping of actual instruction arguments (currently only names are
dumped). This is quite tricky since the dumper has to effectively
"interpret" the instructions.
llvm-svn: 175820
2013-02-21 22:53:19 +00:00
Benjamin Kramer
e11f88e804
Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage.
...
llvm-svn: 175264
2013-02-15 12:30:38 +00:00
Krzysztof Parzyszek
de39fad3d2
Add support for the pubnames section to llvm-dwarfdump.
...
llvm-svn: 174976
2013-02-12 16:20:28 +00:00
David Tweed
0d0db378f4
The patch to fix some issues in r174543 fixed the lines failing the test, but missed a couple
...
of lines which weren't being explicitly looked at and were printing incorrect results. These
values clearly must lie within 32 bits, so the casts are definitely safe.
llvm-svn: 174717
2013-02-08 16:35:10 +00:00
NAKAMURA Takumi
2ea96df1f0
FDE::dumpHeader(): Forgot to fix one more formatting, ... take two!
...
Excuse me, I could not test it locally.
llvm-svn: 174614
2013-02-07 14:54:42 +00:00
NAKAMURA Takumi
d33774373d
FDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian hosts.
...
llvm-svn: 174602
2013-02-07 10:57:42 +00:00
NAKAMURA Takumi
b493210348
DWARFDebugFrame.cpp: Fix formatting on i686 hosts.
...
FIXME: Are they really truncated to i32 from i64 unconditionally?
llvm-svn: 174574
2013-02-07 02:02:27 +00:00
Eli Bendersky
31f7dcd2e4
Add some comments to new frame entries
...
llvm-svn: 174515
2013-02-06 16:20:31 +00:00
Eli Bendersky
935df72ee3
Failing builds because a private class member is not being used after
...
initialization is one of the reasons I consider -werror to be shoddy.
llvm-svn: 174485
2013-02-06 05:37:46 +00:00
Eli Bendersky
bd977c5c69
Add virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor
...
llvm-svn: 174483
2013-02-06 03:08:02 +00:00
Eli Bendersky
7eeb3473bf
Fix some formatting & add comments, following Eric's review
...
llvm-svn: 174473
2013-02-06 00:20:38 +00:00
Eli Bendersky
b5ee34671c
Add missing file to CMake list
...
llvm-svn: 174465
2013-02-05 23:37:18 +00:00
Eli Bendersky
0802d28eff
Initial support for DWARF CFI parsing and dumping in LLVM
...
llvm-svn: 174463
2013-02-05 23:30:58 +00:00
NAKAMURA Takumi
731f502bbd
DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?
...
llvm-svn: 173552
2013-01-26 01:45:06 +00:00
Andrew Kaylor
2677c75e5d
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.
...
llvm-svn: 173537
2013-01-26 00:28:05 +00:00
Nadav Rotem
78ccedd76a
Fix a warning in the new DWARFheader. Add a new line at the end of the file.
...
llvm-svn: 173518
2013-01-25 22:57:05 +00:00
Andrew Kaylor
c9fa0590eb
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.
...
llvm-svn: 173517
2013-01-25 22:50:58 +00:00
Eli Bendersky
1b58747212
Add command-line flags for DWARF dumping.
...
Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.
llvm-svn: 173480
2013-01-25 20:26:43 +00:00
Eric Christopher
bd3c66b31a
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.
llvm-svn: 172699
2013-01-17 03:00:04 +00:00
Eric Christopher
7c06c5fb2b
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.
llvm-svn: 172698
2013-01-17 02:59:59 +00:00
Eric Christopher
a159b6c731
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.
llvm-svn: 172578
2013-01-15 23:56:56 +00:00
NAKAMURA Takumi
3f5b60a9a0
[Object, DebugInfo] Make DWARFContext BE-aware.
...
test/DebugInfo/member-pointers.ll would not fail in targetting BE any more.
llvm-svn: 171943
2013-01-09 02:45:05 +00:00
Eric Christopher
4b9394acd5
Whitespace and 80-col.
...
llvm-svn: 171804
2013-01-07 22:40:48 +00:00
Eric Christopher
ba738518f0
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.
llvm-svn: 171779
2013-01-07 19:32:41 +00:00
Eric Christopher
e8b74437f7
Update comment.
...
llvm-svn: 171689
2013-01-07 03:27:58 +00:00
Eric Christopher
d593f65fae
Add a space to the end of the line so we don't get "itsbounds" in output.
...
llvm-svn: 171487
2013-01-04 18:30:36 +00:00
Eric Christopher
03fdb543d9
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).
llvm-svn: 171428
2013-01-02 23:52:13 +00:00
Eric Christopher
c6fa1e95a2
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.
llvm-svn: 171126
2012-12-27 01:07:07 +00:00
Rafael Espindola
cb6155ac8d
Don't skip __DWARF,
...
Now that we don't merge section and segment names, we don't need to skip the
segment name to get to the section name.
llvm-svn: 170839
2012-12-21 04:08:03 +00:00
Bill Wendling
56d9c4b832
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
...
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Chandler Carruth
a98c778194
Sort includes for all of the .h files under the 'lib' tree. These were
...
missed in the first pass because the script didn't yet handle include
guards.
Note that the script is now able to handle all of these headers without
manual edits. =]
llvm-svn: 169224
2012-12-04 07:12:27 +00:00
Eric Christopher
178793931e
The section is .debug_line.
...
llvm-svn: 168666
2012-11-27 01:40:36 +00:00
Eric Christopher
5843894e1e
Add some basic support for the fission addr forms to DebugInfo.
...
llvm-svn: 168223
2012-11-16 23:44:11 +00:00
Alexey Samsonov
3f02d70a5b
[DebugInfo] Generate address ranges for compile units even if .debug_aranges is present: it is often the case that .debug_aranges section contains ranges only for a small subset of compile units. Test cases will be added in separate commits.
...
llvm-svn: 168144
2012-11-16 08:36:25 +00:00
Eric Christopher
9df7c1b185
Rewrite DIContext interface to take an object. Update all callers.
...
llvm-svn: 167757
2012-11-12 21:40:38 +00:00
Alexey Samsonov
8fee8dc998
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.
...
llvm-svn: 167728
2012-11-12 14:25:36 +00:00
Eric Christopher
b34bece6a8
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.
llvm-svn: 167558
2012-11-07 23:22:07 +00:00
Eric Christopher
1dcc1b0cdc
Reformat and 80-column this. It's not strictly conforming
...
yet, but it's better.
llvm-svn: 167053
2012-10-30 21:36:43 +00:00
Eric Christopher
98ed8efd11
Use a typedef to reduce some typing and reformat code accordingly.
...
llvm-svn: 166077
2012-10-16 23:46:25 +00:00
Eric Christopher
e411070efb
Variable name cleanup.
...
llvm-svn: 166076
2012-10-16 23:46:23 +00:00
Craig Topper
5a3d1cefa5
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
...
llvm-svn: 164090
2012-09-18 02:01:41 +00:00
Roman Divacky
85348270cd
Stop casting away const qualifier needlessly.
...
llvm-svn: 163258
2012-09-05 22:26:57 +00:00
Roman Divacky
4c161d6fab
Remove unused typedefs gcc4.8 warns about.
...
llvm-svn: 163225
2012-09-05 17:55:46 +00:00
Alexey Samsonov
0dd3d6f49e
Add support for fetching inlining context (stack of source code locations)
...
by instruction address from DWARF.
Add --inlining flag to llvm-dwarfdump to demonstrate and test this functionality,
so that "llvm-dwarfdump --inlining --address=0x..." now works much like
"addr2line -i 0x...", provided that the binary has debug info
(Clang's -gline-tables-only *is* enough).
llvm-svn: 163128
2012-09-04 08:12:33 +00:00
Alexey Samsonov
ac2e149b2d
Refactor fetching file/line info from DWARFContext to simplify the
...
code and allow better code reuse. Make the code a bit more conforming
to LLVM code style.
No functionality change.
llvm-svn: 162895
2012-08-30 07:49:50 +00:00
Marshall Clow
7c9fea2579
Fix compile error when building with C++11 - clang thinks that PRIx64 is a user-defined suffix or something
...
llvm-svn: 162704
2012-08-27 22:53:35 +00:00
NAKAMURA Takumi
940981753b
DWARFDebugRangeList.cpp: Use PRIx64 for uint64_t as format string.
...
llvm-svn: 162665
2012-08-27 10:10:10 +00:00