Eric Christopher
9e429ae779
Add a resolve method on CompileUnit that forwards to DwarfDebug.
...
llvm-svn: 192014
2013-10-05 00:27:02 +00:00
Eric Christopher
fa205cad7c
Make a bunch of CompileUnit member functions private.
...
llvm-svn: 192009
2013-10-05 00:05:51 +00:00
Eric Christopher
fe3ae44179
Remove odd use of this.
...
llvm-svn: 192004
2013-10-04 23:49:31 +00:00
Eric Christopher
f0388b7b39
Reformat some odd formattings.
...
llvm-svn: 192003
2013-10-04 23:49:29 +00:00
Eric Christopher
08f7c8f1fe
Tighten up some type arguments to functions. Where we expect a
...
scope, pass a scope.
llvm-svn: 192002
2013-10-04 23:49:26 +00:00
Eric Christopher
c19d6f096c
Temporarily revert r176882 as it needs to be implemented in a different
...
way for all platforms.
llvm-svn: 191975
2013-10-04 19:40:33 +00:00
Eric Christopher
9cd26af8b6
Move emission of the debug string table to early in the debug
...
info finalization to greatly reduce the number of fixups that the
assembler has to handle in order to improve compile time.
llvm-svn: 191119
2013-09-20 23:22:52 +00:00
Eric Christopher
9c58f317da
Migrate addGlobalName to the .cpp file as an intermediate step
...
to further work.
llvm-svn: 191113
2013-09-20 22:20:55 +00:00
Benjamin Kramer
079b96e6f7
Revert "Give internal classes hidden visibility."
...
It works with clang, but GCC has different rules so we can't make all of those
hidden. This reverts commit r190534.
llvm-svn: 190536
2013-09-11 18:05:11 +00:00
Benjamin Kramer
6a44af3629
Give internal classes hidden visibility.
...
Worth 100k on a linux/x86_64 Release+Asserts clang.
llvm-svn: 190534
2013-09-11 17:42:27 +00:00
Eric Christopher
ca68bbf5c0
Formatting.
...
llvm-svn: 189296
2013-08-26 23:58:22 +00:00
Eric Christopher
bfceb2fe8f
Remove the language parameter and variable from the compile unit. We
...
can get it via the MDNode that's passed in. Save that instead.
llvm-svn: 189291
2013-08-26 23:50:38 +00:00
Eric Christopher
31b0576b01
Be more rigorous about the sizes of forms and attributes.
...
llvm-svn: 187953
2013-08-08 01:41:00 +00:00
Eric Christopher
19d153261f
Formatting.
...
llvm-svn: 186851
2013-07-22 18:26:15 +00:00
Benjamin Kramer
5dbec7d961
Simplify code. No functionality change.
...
llvm-svn: 185689
2013-07-05 10:20:57 +00:00
Eric Christopher
78fcf490d8
addConstantValue, addConstantFPValue never returned anything but
...
true, so remove the return value and propagate accordingly.
llvm-svn: 185490
2013-07-03 01:08:30 +00:00
Ulrich Weigand
396ba8b495
[DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr values
...
This partially reverts r185202 and restores DIELabel to hold plain
MCSymbol references. Instead, we add a new subclass DIEExpr of
DIEValue that can hold generic MCExpr references.
This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.
llvm-svn: 185458
2013-07-02 18:46:26 +00:00
David Blaikie
f3cd7c5115
DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
...
This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.
llvm-svn: 185202
2013-06-28 20:05:04 +00:00
Eric Christopher
bf2d23c0d7
Use const references instead of pointers to references that are
...
never modified. No functional change.
llvm-svn: 184781
2013-06-24 21:07:27 +00:00
David Blaikie
ea2605dc1a
DebugInfo: don't use location lists when the location covers the whole function anyway
...
Fix up three tests - one that was relying on abbreviation number,
another relying on a location list in this case (& testing raw asm,
changed that to use dwarfdump on the debug_info now that that's where
the location is), and another which was added in r184368 - exposing a
bug in that fix that is exposed when we emit the location inline rather
than through a location list. Fix that bug while I'm here.
llvm-svn: 184387
2013-06-20 00:25:24 +00:00
Eric Christopher
c57baeeee0
Pass the MDNode in and do the insertion at compile unit creation time
...
instead of relying upon an extra call to finish initializing.
llvm-svn: 181383
2013-05-08 00:58:51 +00:00
Eric Christopher
6156011ee8
Typo.
...
llvm-svn: 181378
2013-05-08 00:11:10 +00:00
David Blaikie
684fc5331e
DebugInfo: Support imported modules in lexical blocks
...
llvm-svn: 181271
2013-05-06 23:33:07 +00:00
Manman Ren
14a029d9f3
Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
...
belongs to a different compile unit.
DW_FORM_ref_addr should be used for cross compile-unit reference.
When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.
This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.
rdar://problem/13370501
llvm-svn: 176882
2013-03-12 18:27:15 +00:00
Krzysztof Parzyszek
228daa6986
Allow optionally generating pubnames section in DWARF info. Introduce
...
option "generate-dwarf-pubnames" to control it, set to "false" by default.
llvm-svn: 174981
2013-02-12 18:00:14 +00:00
David Blaikie
a39a76efbc
The last of PR14471 - emission of constant floats
...
llvm-svn: 172941
2013-01-20 01:18:01 +00:00
Eric Christopher
e9ec2458e7
Split out DW_OP_addr for the split debug info DWARF5 proposal.
...
llvm-svn: 172857
2013-01-18 22:11:33 +00:00
Eric Christopher
4d23a4ae1f
Define metadata interfaces for describing a static data member
...
of a class. Emit static data member declarations and definitions
through correctly.
Part of PR14471.
Patch by Paul Robinson!
llvm-svn: 172590
2013-01-16 01:22:23 +00:00
Eric Christopher
962c9089d9
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
Eric Christopher
2cbd5767ad
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
48fef599a4
Whitespace and 80-column cleanup.
...
llvm-svn: 170771
2012-12-20 21:58:40 +00:00
Eric Christopher
e698f53740
Start splitting out the debug string section handling by moving it
...
into the DwarfUnits class.
llvm-svn: 170770
2012-12-20 21:58:36 +00:00
Bill Wendling
3495f9b6dd
s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natural check first in the if-then statement.
...
llvm-svn: 169486
2012-12-06 07:55:19 +00:00
Bill Wendling
28fe9e7a36
Handle non-default array bounds.
...
Some languages, e.g. Ada and Pascal, allow you to specify that the array bounds
are different from the default (1 in these cases). If we have a lower bound
that's non-default, then we emit the lower bound. We also calculate the correct
upper bound in those cases.
llvm-svn: 169484
2012-12-06 07:38:10 +00:00
Chandler Carruth
802d755533
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
Eli Bendersky
b42d1466a0
Fix PR12942: Allow two CUs to be generated from the same source file.
...
Thanks Eric for the review.
llvm-svn: 169142
2012-12-03 18:45:45 +00:00
Eric Christopher
e8a7b1b741
80-col fixup.
...
llvm-svn: 163569
2012-09-10 23:34:03 +00:00
Eric Christopher
bb69a27dbc
Use DW_FORM_flag_present to save space in debug information if we're
...
not in darwin gdb compat mode.
Fixes rdar://10975088
llvm-svn: 162526
2012-08-24 01:14:27 +00:00
Bill Wendling
e38859dc8e
Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
...
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.
The reasoning is because the DebugInfo module is simply an interface to the
debug info MDNodes and has nothing to do with analysis.
llvm-svn: 159312
2012-06-28 00:05:13 +00:00
Eric Christopher
70e1bd8872
Add support for objc property decls according to the page at:
...
http://llvm.org/docs/SourceLevelDebugging.html#objcproperty
including type and DECL. Expand the metadata needed accordingly.
rdar://11144023
llvm-svn: 153639
2012-03-29 08:42:56 +00:00
Eric Christopher
7285c7d51d
Fix the output of the DW_TAG_friend tag to include DW_AT_friend
...
and not the rest of the member tag.
Fixes PR11695
llvm-svn: 153570
2012-03-28 07:34:31 +00:00
Eric Christopher
3a2656b394
Add the source language into the compile unit.
...
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Eric Christopher
21bde87bf3
As part of the ongoing work in finalizing the accelerator tables, extend
...
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.
rdar://10652330
llvm-svn: 147651
2012-01-06 04:35:23 +00:00
Eric Christopher
66b37db641
Make types and namespaces take multiple DIEs for the accelerator tables
...
as well.
llvm-svn: 144319
2011-11-10 21:47:55 +00:00
Eric Christopher
d9843b34e6
Rework adding function names to the dwarf accelerator tables, allow
...
multiple dies per function and support C++ basenames.
llvm-svn: 144304
2011-11-10 19:25:34 +00:00
Eric Christopher
5223a57533
Remove the pubnames section, no one consumes it.
...
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Eric Christopher
4996c70034
Add the support code to enable the dwarf accelerator tables. Upcoming patches
...
to fix the types section (all types, not just global types), and testcases.
The code to do the final emission is disabled by default.
llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Eric Christopher
2b4f77350d
Typo.
...
llvm-svn: 143918
2011-11-07 09:18:32 +00:00
Nick Lewycky
d59c0cac6c
Teach our Dwarf emission to use the string pool.
...
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Devang Patel
eb1bb4e419
Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
...
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.
llvm-svn: 137778
2011-08-16 22:09:43 +00:00
Devang Patel
3acc70e536
Refactor. Variables are part of compile unit so let CompileUnit create new variable.
...
llvm-svn: 137663
2011-08-15 22:04:40 +00:00
Devang Patel
dfd6ec3ce1
Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
...
llvm-svn: 137621
2011-08-15 17:57:41 +00:00
Devang Patel
895437142a
Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
...
llvm-svn: 137618
2011-08-15 17:24:54 +00:00
Devang Patel
f071d72c44
Handle debug info for i128 constants.
...
llvm-svn: 133821
2011-06-24 20:46:11 +00:00
Devang Patel
562c74284f
Incomplete type may not have corresponding DIE, so do not check DIEEntry eagerly.
...
llvm-svn: 132377
2011-06-01 00:23:24 +00:00
Devang Patel
1cb8ab456c
Refactor.
...
llvm-svn: 132373
2011-05-31 23:30:30 +00:00
Devang Patel
3c6aed2d98
Select DW_AT_const_value size based on variable size.
...
llvm-svn: 132193
2011-05-27 16:45:18 +00:00
Jim Grosbach
17c1d13ee4
Fix typo.
...
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Devang Patel
77dc541b00
Simplify handling of variables with complex address (i.e. blocks variables)
...
llvm-svn: 130339
2011-04-27 22:45:24 +00:00
Devang Patel
ba5fbf17df
Refactor code. Keep dwarf register operation selection logic at one place.
...
llvm-svn: 130231
2011-04-26 19:06:18 +00:00
Devang Patel
8ce24133fd
Rename a method to match what it really does.
...
s/addVariableAddress/addFrameVariableAddress/g
llvm-svn: 130170
2011-04-25 23:02:17 +00:00
Devang Patel
13d47f0ddc
Do not reuse parameter name.
...
llvm-svn: 129405
2011-04-12 23:09:06 +00:00
Devang Patel
f20c4f715f
This mechanical patch moves type handling into CompileUnit from DwarfDebug. In case of multiple compile unit in one object file, each compile unit is responsible for its own set of type entries anyway. This refactoring makes this obvious.
...
llvm-svn: 129402
2011-04-12 22:53:02 +00:00
Devang Patel
5eb4319dba
Refactor CompileUnit into a separate header.
...
llvm-svn: 129367
2011-04-12 17:40:32 +00:00