1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

369 Commits

Author SHA1 Message Date
David Blaikie
325663f20a DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node
llvm-svn: 194893
2013-11-15 23:52:02 +00:00
David Blaikie
2353a7536a DwarfDebug: Push DISubprogram through updateSubprogramScopeDIE
llvm-svn: 194879
2013-11-15 23:13:08 +00:00
Manman Ren
429e265cd8 Debug Info: remove duplication of DIEs when a DIE can be shared across CUs.
We add a map in DwarfDebug to map MDNodes that are shareable across CUs to the
corresponding DIEs: MDTypeNodeToDieMap. These DIEs can be shared across CUs,
that is why we keep the maps in DwarfDebug instead of CompileUnit.

We make the assumption that if a DIE is not added to an owner yet, we assume
it belongs to the current CU. Since DIEs for the type system are added to
their owners immediately after creation, and other DIEs belong to the current
CU, the assumption should be true.

A testing case is added to show that we only create a single DIE for a type
MDNode and we use ref_addr to refer to the type DIE.

We also add a testing case to show ref_addr relocations for non-darwin
platforms.

llvm-svn: 193779
2013-10-31 17:54:35 +00:00
David Blaikie
8f9b0650cf DwarfDebug: Change Abbreviations member from pointer to reference
llvm-svn: 193699
2013-10-30 17:14:24 +00:00
Manman Ren
4c36c44e3f Debug Info: support for DW_FORM_ref_addr.
To support ref_addr, we calculate the section offset of a DIE (i.e. offset
of a DIE from beginning of the debug info section). The Offset field in DIE
is currently CU-relative. To calculate the section offset, we add a
DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
for each CompileUnit.

A helper function DIE::getCompileUnit is added to return the CU DIE that
the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
finding the CU for a given CU DIE.

For a cross-referenced DIE, we first find the CU DIE it belongs to with
getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
Adding the section offset of the CU with the CU-relative offset of a DIE gives
us the seciton offset of the DIE.

We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
doesDwarfUseRelocationsAcrossSections is true.

This commit handles the emission of DW_FORM_ref_addr when we have an attribute
with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
DIEEntry. This commit will be tested and verified in the follow-on patch.

Reviewed off-list by Eric, Thanks.

llvm-svn: 193658
2013-10-29 22:57:10 +00:00
Eric Christopher
c48826138b Grammar.
llvm-svn: 193372
2013-10-24 21:20:23 +00:00
Adrian Prantl
136f28c6a8 Remove some dead code. (DarwinGDBCompat was retired in r189903).
llvm-svn: 192731
2013-10-15 20:26:37 +00:00
Manman Ren
3634a1bde6 Add DbgVariable::resolve per Eric's suggestion.
llvm-svn: 192218
2013-10-08 19:07:44 +00:00
Manman Ren
b6cdd4e959 Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192018
2013-10-05 01:43:03 +00:00
Eric Christopher
4cdd7ad156 Fix one comment and update another. Slightly reformat.
llvm-svn: 192016
2013-10-05 00:32:34 +00:00
Eric Christopher
dd034c0291 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
88a8082ea0 Temporarily revert r191792 as it is causing some LTO debug failures
on platforms with relocations in debug info and also temporarily
revert r191800 due to conflicts with the revert of r191792.

llvm-svn: 191967
2013-10-04 17:08:38 +00:00
Alexey Samsonov
78295ae841 Remove wild .debug_aranges entries generated from unimportant labels
r191052 added emitting .debug_aranges to Clang, but this
functionality is broken: it uses all MC labels added in DWARF Asm
printer, including the labels for build relocations between
different DWARF sections, like .Lsection_line or .Ldebug_loc0.

As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
attribute, .debug_aranges would also contain a range starting from 0x123,
breaking tools that rely on this section.

This patch fixes this by using only MC labels that corresponds to the
addresses in the user program.

llvm-svn: 191884
2013-10-03 08:54:43 +00:00
Manman Ren
2771d4ef9c Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 191800
2013-10-01 23:45:54 +00:00
Manman Ren
ba5cd65c4c Debug Info: remove duplication of DIEs when a DIE is part of the type system
and it is shared across CUs.

We add a few maps in DwarfDebug to map MDNodes for the type system to the
corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and
MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we
keep the maps in DwarfDebug instead of CompileUnit.

Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added
to its owner yet, so we don't know whether we should use ref_addr or ref4.
We create a worklist that will be processed during finalization to add
attributes with the correct form (ref_addr or ref4).

We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks
whether we know the correct form, if not, we update the worklist
(DIEEntryWorklist).

A testing case is added to show that we only create a single DIE for a type
MDNode and we use ref_addr to refer to the type DIE.

llvm-svn: 191792
2013-10-01 19:52:23 +00:00
Eric Christopher
d9670853b9 The DW_AT_GNU_pubnames/pubtypes attributes are actually form
SEC_OFFSET from the beginning of the section so go ahead and emit
a label at the beginning of each one.

llvm-svn: 191710
2013-09-30 23:14:16 +00:00
Richard Mitton
c9d37e3d42 Fixed debug_aranges handling for common symbols.
The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.

.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.

Test case update to account for this.

llvm-svn: 191210
2013-09-23 17:56:20 +00:00
Richard Mitton
fe7ffd01f6 Added support for generate DWARF .debug_aranges sections automatically.
llvm-svn: 191052
2013-09-19 23:21:01 +00:00
Eric Christopher
89bc57b9bc Add initial support for handling gnu style pubnames accepted by some
versions of gold. This support is designed to allow gold to produce
gdb_index sections similar to the accelerator tables and consumable
by gdb.

llvm-svn: 190649
2013-09-13 00:35:05 +00:00
Benjamin Kramer
23f676e21d 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
386bd314a1 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
Manman Ren
5463da1410 Debug Info: create scope children DIEs when the scope DIE is not null.
We try to create the scope children DIEs after we create the scope DIE. But
to avoid emitting empty lexical block DIE, we first check whether a scope
DIE is going to be null, then create the scope children if it is not null.
From the number of children, we decide whether to actually create the scope DIE.

This patch also removes an early exit which checks for a special condition.
It also removes deletion of un-used children DIEs that are generated
because we used to generate children DIEs before the scope DIE.

Deletion of un-used children DIEs may cause problem because we sometimes keep
created DIEs in a member variable of a CU.

llvm-svn: 190421
2013-09-10 18:40:41 +00:00
Manman Ren
35368ab81c Debug Info: define a DIRef template.
Specialize the constructors for DIRef<DIScope> and DIRef<DIType> to make sure
the Value is indeed a scope ref and a type ref.

Use DIScopeRef for DIScope::getContext and DIType::getContext and use DITypeRef
for getContainingType and getClassType.

DIScope::generateRef now returns a DIScopeRef instead of a "Value *" for
readability and type safety.

llvm-svn: 190418
2013-09-10 18:30:07 +00:00
Manman Ren
1d636947c7 Debug Info: move DIScope::getContext back from DwarfDebug.
This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.

llvm-svn: 190362
2013-09-09 22:35:23 +00:00
Eric Christopher
0bb818e3fe Rename for consistency.
llvm-svn: 190345
2013-09-09 20:03:17 +00:00
Manman Ren
bbef7b7d9f Debug Info: move DIScope::getContext to DwarfDebug.
DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.
    
DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.

llvm-svn: 190330
2013-09-09 19:23:58 +00:00
Manman Ren
6d25d90435 Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.
This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.

llvm-svn: 190325
2013-09-09 19:05:21 +00:00
Manman Ren
ed987c2b23 Debug Info: Rename DITypeRef to DIScopeRef.
A reference to a scope is more general than a reference to a type since
DIType is a subclass of DIScope.

A reference to a type can be either an identifier for the type or
the DIType itself, while a reference to a scope can be either an
identifier for the type (when the scope is indeed a type) or the
DIScope itself. A reference to a type and a reference to a scope
will be resolved in the same way. The only difference is in the
verifier when a field is a reference to a type (i.e. the containing
type field of a DICompositeType) or a field is a reference to a scope
(i.e. the context field of a DIType).

This is to get ready for switching DIType::getContext to return
DIScopeRef instead of DIScope.

Tighten up isTypeRef and isScopeRef to make sure the identifier is not
empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.

llvm-svn: 190322
2013-09-09 19:03:51 +00:00
Manman Ren
01c483fca6 Debug Info: Use identifier to reference DIType in base type field of
ptr_to_member.

We introduce a new class DITypeRef that represents a reference to a DIType.
It wraps around a Value*, which can be either an identifier in MDString
or an actual MDNode. The class has a helper function "resolve" that
finds the actual MDNode for a given DITypeRef.

We specialize getFieldAs to return a field that is a reference to a
DIType. To correctly access the base type field of ptr_to_member,
getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef.

Also add a typedef for DITypeIdentifierMap and a helper
generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep
a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually
populate the map.

Verifier is updated accordingly.

llvm-svn: 190081
2013-09-05 18:48:31 +00:00
Eric Christopher
b903425dec Remove support for the .debug_inlined section. No known software
in use supports it.

llvm-svn: 189439
2013-08-28 04:04:28 +00:00
Eric Christopher
2eace037f7 Have the skeleton compile unit construction method take the CU it
is constructing from as an input and keep the same unique identifier.
We can use this to connect items which must stay in the .o file
(e.g. pubnames and pubtypes) to the skeleton cu rather than having
duplicate unique numbers for the sections and needing to do lookups
based on MDNode.

llvm-svn: 189293
2013-08-26 23:50:43 +00:00
Eric Christopher
04da79d6a3 Treat the pubtypes section similarly to the pubnames section and emit
it by default under linux or when we're trying to keep compatibility
with old gdb versions.

Fix testcase for option name change.

llvm-svn: 189289
2013-08-26 23:24:35 +00:00
Eric Christopher
fe60d7311c Turn on pubnames by default on linux.
Until gdb supports the new accelerator tables we should add the
pubnames section so that gdb_index can be generated from gold
at link time. On darwin we already emit the accelerator tables
and so don't need to worry about pubnames.

llvm-svn: 188708
2013-08-19 21:07:38 +00:00
Eric Christopher
c16b1aaf3f Be more rigorous about the sizes of forms and attributes.
llvm-svn: 187953
2013-08-08 01:41:00 +00:00
Eric Christopher
04dc3562f6 Add preliminary support for hashing DIEs and breaking them into
type units.

Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.

This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.

In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.

llvm-svn: 187213
2013-07-26 17:02:41 +00:00
Eric Christopher
c95ff399e8 Clarify comments.
llvm-svn: 186297
2013-07-14 22:23:54 +00:00
Eric Christopher
1931de8109 Update comment to avoid mentioning DbgValues which is an instance
variable later in the class.

llvm-svn: 185866
2013-07-08 21:16:18 +00:00
Manman Ren
1da12e6b2b Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.

llvm-svn: 185847
2013-07-08 18:33:29 +00:00
Eric Christopher
ca3c4f4738 Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses.

llvm-svn: 185588
2013-07-03 22:40:18 +00:00
Eric Christopher
656b62afda Add names to the header file since they help in documenting the API
(and for consistency).

llvm-svn: 185585
2013-07-03 21:23:59 +00:00
Eric Christopher
18d59bdefb Move typedefs inside the class that they belong to.
llvm-svn: 185573
2013-07-03 20:36:36 +00:00
Eric Christopher
ca56a2549b Remove unused field.
llvm-svn: 185523
2013-07-03 08:26:07 +00:00
Eric Christopher
73d58b6c4d Constify a few functions.
llvm-svn: 185520
2013-07-03 08:13:55 +00:00
Craig Topper
d118c8d864 Introduce some typedefs for DenseMaps containing SmallVectors so the vector size doesn't have to repeated when creating iterators for the DenseMap.
llvm-svn: 185508
2013-07-03 04:40:27 +00:00
Eric Christopher
04defbc3d4 Move instance variable before experimental section.
llvm-svn: 185497
2013-07-03 01:57:26 +00:00
Eric Christopher
0ca30ad6a6 Fix typo to make grep for DW_AT_comp_dir work without case-insensitive
grep.

llvm-svn: 185496
2013-07-03 01:57:23 +00:00
Eric Christopher
0b1ab8f51b Remove unnecessary forward declare.
llvm-svn: 185495
2013-07-03 01:57:20 +00:00
Manman Ren
4245062b12 Debug Info: use module flag to set up Dwarf version.
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.

TODO: turn on/off features depending on the Dwarf version.
llvm-svn: 185484
2013-07-02 23:40:10 +00:00
Ulrich Weigand
d8bd69e85f [DebugInfo] Hold generic MCExpr in AddrPool
This changes the AddrPool infrastructure to enable it to hold
generic MCExpr expressions, not just MCSymbolRefExpr.

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: 185459
2013-07-02 18:46:46 +00:00
David Blaikie
742cfe7ffb PR14728: DebugInfo: TLS variables with -gsplit-dwarf
llvm-svn: 185398
2013-07-01 23:55:52 +00:00
David Blaikie
11bb2e64f2 DebugInfo: Simplify the AddressPool representation
llvm-svn: 185189
2013-06-28 18:47:19 +00:00
David Blaikie
9f141a4f1b DebugInfo: constify the AddressPool MCSymbol pointers
llvm-svn: 185188
2013-06-28 18:47:14 +00:00
Manman Ren
7ef1e78101 LTO+Debug Info: revert r182791.
Since the testing case uses ref_addr, which requires version 3+ to work,
we will solve the dwarf version issue first.

This patch also causes failures in one of the bots. I will update the patch
accordingly in my next attempt.

rdar://13926659

llvm-svn: 182867
2013-05-29 17:16:59 +00:00
Manman Ren
f51e67e9a2 LTO+Debug Info: correctly emit inlined_subroutine when the inlined callee is
from a different CU.

We used to print out an error message and fail to generate inlined_subroutine.

If we use ref_addr in the generated DWARF, the DWARF version should be 3 or
above.
rdar://13926659

llvm-svn: 182791
2013-05-28 19:01:58 +00:00
Rafael Espindola
32589d78a2 Remove more dead code.
llvm-svn: 181656
2013-05-11 02:24:41 +00:00
David Blaikie
c1ede7b228 Finish renaming constructImportedModuleDIE to constructImportedEntityDIE
llvm-svn: 181391
2013-05-08 06:01:38 +00:00
David Blaikie
0e8a5b9d09 Rename DIImportedModule to DIImportedEntity and allow imported declarations
DIBuilder::createImportedDeclaration isn't fully plumbed through (note,
lacking in AsmPrinter/DwarfDebug support) but this seemed like a
sufficiently useful division of code to make the subsequent patch(es)
easier to follow.

llvm-svn: 181364
2013-05-07 21:35:53 +00:00
David Blaikie
b40dfb39c7 DebugInfo: Support imported modules in lexical blocks
llvm-svn: 181271
2013-05-06 23:33:07 +00:00
David Blaikie
9bfe15c313 Revert "Revert "PR14606: debug info imported_module support""
This reverts commit r179840 with a fix to test/DebugInfo/two-cus-from-same-file.ll

I'm not sure why that test only failed on ARM & MIPS and not X86 Linux, even
though the debug info was clearly invalid on all of them, but this ought to fix
it.

llvm-svn: 179996
2013-04-22 06:12:31 +00:00
Eric Christopher
88bdd26cc9 Revert "PR14606: debug info imported_module support"
This reverts commit r179836 as it seems to have caused test failures.

llvm-svn: 179840
2013-04-19 07:47:16 +00:00
David Blaikie
46f35f8e56 PR14606: debug info imported_module support
Adding another CU-wide list, in this case of imported_modules (since they
should be relatively rare, it seemed better to add a list where each element
had a "context" value, rather than add a (usually empty) list to every scope).
This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll
need to expand this to cover DW_TAG_imported_declaration too.

llvm-svn: 179836
2013-04-19 06:57:04 +00:00
Eric Christopher
546e1942f2 DW_FORM_sec_offset should be a relocation on platforms that use
a relocation across sections. Do this for DW_AT_stmt list in the
skeleton CU and check the relocations in the debug_info section.

Add a FIXME for multiple CUs.

llvm-svn: 178969
2013-04-07 03:43:09 +00:00
Manman Ren
d88019ac47 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
David Blaikie
cae22d7ca6 Remove support for versioned debug info.
Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

llvm-svn: 176838
2013-03-11 23:39:23 +00:00
Manman Ren
4287c8ee15 Debug Info: store the files and directories for each compile unit.
We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.

The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.

rdar://problem/13342023

llvm-svn: 176605
2013-03-07 01:42:00 +00:00
Krzysztof Parzyszek
bb3116f965 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
Eric Christopher
37c96d530b "Clean up" line section symbol emission by emitting the section
syms before constructing the compile units so we're not emitting
section references to sections not there already.

llvm-svn: 174663
2013-02-07 21:19:50 +00:00
Eric Christopher
19e3875192 Clean up multiple skeleton compile units if we have multiple compile
units coming in.

llvm-svn: 174548
2013-02-06 21:53:56 +00:00
Eric Christopher
9d072d2846 Remove some dead code.
llvm-svn: 174547
2013-02-06 21:53:53 +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
Eric Christopher
11f9d2e631 Move the string pools down into the units. No functional change.
llvm-svn: 171905
2013-01-08 22:22:06 +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
7096eb5a5c For the dwarf5 split debug info code split out the string section
per compile unit/skeleton compile unit. Update tests accordingly.

llvm-svn: 171133
2012-12-27 02:14:01 +00:00
Eric Christopher
537c3f1bc9 Whitespace and 80-column cleanup.
llvm-svn: 170771
2012-12-20 21:58:40 +00:00
Eric Christopher
622a4d5b97 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
Eric Christopher
0f1dd74523 Split out abbreviations for the skeleton info from the rest of
the abbreviations. Part of implementing split dwarf.

llvm-svn: 170589
2012-12-19 22:02:53 +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
Dmitri Gribenko
79a7f51c9a Declare class DwarfDebug before use instead of relying on a forward declaration
from some other unrelated header.

Patch by Kai.

llvm-svn: 170284
2012-12-16 12:57:36 +00:00
Eric Christopher
9e773fa45e To simplify some code move the unit emission into the holders.
Make emitDIE public accordingly. No functional change.

llvm-svn: 170258
2012-12-15 00:04:07 +00:00
Eric Christopher
1a93fc9d67 Update some comments.
llvm-svn: 169907
2012-12-11 19:42:09 +00:00
Eric Christopher
2d11b002bc 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.

llvm-svn: 169793
2012-12-10 23:34:43 +00:00
Eric Christopher
b3b9b702cb Rearrange vars and make comments more obvious.
llvm-svn: 169780
2012-12-10 22:25:41 +00:00
Eric Christopher
c67794597d Use the somewhat semantic term "split dwarf" it more matches what's
going on and makes a lot of the terminology in comments make more sense.

llvm-svn: 169758
2012-12-10 19:51:21 +00:00
Eric Christopher
67243c354a Reorder fission variables.
llvm-svn: 169756
2012-12-10 19:51:13 +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
Eli Bendersky
4b06c42c76 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
17e71f21a8 Add some first skeleton work for the DWARF5 Fission proposal. Emit
part of the compile unit CU and start separating out information into
the various sections that will be pulled out later.

WIP.

llvm-svn: 169061
2012-11-30 23:59:06 +00:00
Eric Christopher
20076dc191 More comment.
llvm-svn: 168952
2012-11-29 22:56:13 +00:00
Eric Christopher
fdaa21621d Attempt to make the comments for dwarf debug look more like
the coding standard would like.

llvm-svn: 168737
2012-11-27 22:43:45 +00:00
Eric Christopher
a2656421d8 Make comment names match function names.
llvm-svn: 168644
2012-11-27 00:41:57 +00:00
Eric Christopher
41a20c2fec Pull some code out into functions to make rearranging them a bit easier.
llvm-svn: 168481
2012-11-22 00:59:49 +00:00
Eric Christopher
9ba928ae46 Update for some of the coding standard before rearranging functions
around.

llvm-svn: 168401
2012-11-21 00:34:35 +00:00
Eric Christopher
2b632babb4 Update some comments.
llvm-svn: 168400
2012-11-21 00:17:49 +00:00
Eric Christopher
b46aced215 Update and add some comments.
llvm-svn: 168399
2012-11-21 00:03:31 +00:00
Eric Christopher
6179304fc4 Whitespace.
llvm-svn: 168398
2012-11-21 00:03:28 +00:00
Eric Christopher
40554d2b5f Remove constness from this, it modifies the output stream as does
everything else underneath.

llvm-svn: 168395
2012-11-20 23:30:11 +00:00
Eric Christopher
d6e6be52c0 Remove unused function argument, add a bit to the comment.
llvm-svn: 168387
2012-11-20 22:14:13 +00:00
Eric Christopher
9c2055893d Remove a function argument and propagate const around accordingly.
llvm-svn: 168338
2012-11-19 22:42:15 +00:00
Eric Christopher
32873f6ec7 Add an option to enable prototype "fission" capabilities and debug changes.
llvm-svn: 167765
2012-11-12 22:22:20 +00:00
Benjamin Kramer
83badeb894 Replace some instances of UniqueVector with SetVector, which is slightly cheaper.
No functionality change.

llvm-svn: 167116
2012-10-31 13:45:49 +00:00