Michael Gottesman
c89466fc22
Revert "Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level.""
...
This reverts commit r189913.
Talked with Eric on IRC. I am going to XFAIL the failing test since it
is using what Eric described as "the member hack" which was needed on
that old GDB.
Sorry for the noise!
llvm-svn: 189914
2013-09-04 04:39:38 +00:00
Michael Gottesman
a318370b8d
Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level."
...
This reverts commit r189903.
This commit broke the phase 1 buildbot for a while.
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684
llvm-svn: 189913
2013-09-04 04:31:56 +00:00
Eric Christopher
614dc83603
Remove the darwin gdb option, that version of gdb is now dead and
...
the rest of the compatibility should be done on a dwarf-N level.
llvm-svn: 189903
2013-09-04 02:02:10 +00:00
Eric Christopher
38f1c64098
Make the default dwarf version 3 for darwin when we can't find one
...
in the module. Add a FIXME with a comment about darwin's ld.
llvm-svn: 189902
2013-09-04 01:38:30 +00:00
Eric Christopher
25b7adc8ce
Add a hashing routine that handles hashing types. Add a test for
...
hashing the contents of DW_FORM_data1 on top of a type with attributes.
llvm-svn: 189862
2013-09-03 21:57:57 +00:00
Eric Christopher
b86e2ad819
Sentences end with periods.
...
llvm-svn: 189861
2013-09-03 21:57:50 +00:00
Eric Christopher
e020fa7c9c
Add the rest of the stock attributes to the attribute table.
...
This won't affect the kinds of hashes we test for as we actually
do hashing based on form and attribute. Change the fission-hash
testcase one last time to handle DW_AT_comp_dir.
llvm-svn: 189840
2013-09-03 20:00:20 +00:00
Eric Christopher
4b358188c6
Don't bother emitting the pubtypes section on darwin since there aren't
...
any maintained consumers of it on that platform.
llvm-svn: 189631
2013-08-30 00:40:17 +00:00
Eric Christopher
ac8199bf60
Reformat slightly.
...
llvm-svn: 189630
2013-08-30 00:39:57 +00:00
Eric Christopher
62caa709fe
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
e9fd605b41
Add a TODO here.
...
llvm-svn: 189428
2013-08-28 00:13:08 +00:00
Eric Christopher
d033d6fb88
Add support for DW_FORM_dataN and DW_FORM_udata to the DIE hashing
...
algorithm. Update the split dwarf hashing testcase accordingly - this
should be the last time that the hash of an empty file changes.
llvm-svn: 189427
2013-08-28 00:10:38 +00:00
Eric Christopher
9d1daa87e7
Use DW_FORM_sdata for signed constant values and udata on occasion
...
when we can. Migrate from using blocks when we're adding just a
single attribute and floating point values are an unsigned, not signed,
bag of bits.
Update all test cases accordingly.
llvm-svn: 189419
2013-08-27 23:49:04 +00:00
Eric Christopher
ca68bbf5c0
Formatting.
...
llvm-svn: 189296
2013-08-26 23:58:22 +00:00
Eric Christopher
6b16b43ef9
Make the lifetime of the DICompileUnit we're constructing from the
...
MDNode more clear as just for a single argument.
llvm-svn: 189294
2013-08-26 23:57:03 +00:00
Eric Christopher
6fdf324f44
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
6d13fe007f
Remove duplicate set of CompilationDir.
...
llvm-svn: 189292
2013-08-26 23:50:40 +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
4d36ca009f
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
bf1ea3c727
Only emit the section sym if we're emitting the section.
...
llvm-svn: 189288
2013-08-26 23:24:31 +00:00
Eric Christopher
5297df025c
Fix thinko.
...
llvm-svn: 189279
2013-08-26 20:58:35 +00:00
David Majnemer
b78df507c8
AsmPrinter: Get rid of llvm$workaround$fake$stub$
...
We currently emit labels with the prefix Lllvm$workaround$fake$stub$ if
the target's MCAsmInfo has getLinkOnceDirective() mapped to something
interesting. This was apparently a work around introduced in r31033 for
binutils that we don't need anymore.
llvm-svn: 189187
2013-08-25 09:18:19 +00:00
Benjamin Kramer
b12cf01908
Add a function object to compare the first or second component of a std::pair.
...
Replace instances of this scattered around the code base.
llvm-svn: 189169
2013-08-24 12:54:27 +00:00
Benjamin Kramer
260de74e48
Simplify code. No functionality change.
...
llvm-svn: 189168
2013-08-24 12:15:54 +00:00
Benjamin Kramer
892daba8d3
DwarfDebug: Delete orphaned children.
...
Leak found by valgrind.
llvm-svn: 189167
2013-08-24 11:55:49 +00:00
David Majnemer
ed89b5c6e7
DebugInfo: Do not use the DWARF Version for the .debug_pubnames or .debug_pubtypes version field
...
Summary:
LLVM would generate DWARF with version 3 in the .debug_pubname and
.debug_pubtypes version fields. This would lead SGI dwarfdump to fail
parsing the DWARF with (in the instance of .debug_pubnames) would exit
with:
dwarfdump ERROR: dwarf_get_globals: DW_DLE_PUBNAMES_VERSION_ERROR (123)
This fixes PR16950.
Reviewers: echristo, dblaikie
Reviewed By: echristo
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1454
llvm-svn: 188869
2013-08-21 06:13:34 +00:00
Eric Christopher
574b5c8885
Use less verbose code and update comments.
...
llvm-svn: 188711
2013-08-19 21:41:38 +00:00
Eric Christopher
7da24888dd
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
David Blaikie
715528be0b
DebugInfo: don't emit zero-length names for parameters
...
We check this in many/all other cases, just missed this one it seems.
Perhaps it'd be worth unifying this so we never emit zero-length
DW_AT_names.
llvm-svn: 188649
2013-08-19 03:34:03 +00:00
David Blaikie
d4e106e39d
DebugInfo: Allow the addition of other (such as static data) members to a record type after construction
...
Plus a type cleanup & minor fix to enumerate members of declarations.
llvm-svn: 188577
2013-08-16 20:42:14 +00:00
Bill Wendling
33fae6935a
Make a few more things const.
...
llvm-svn: 188484
2013-08-15 20:25:44 +00:00
Bill Wendling
2d092f05b4
Use a reference instead of making an unnecessary copy. Also use 'const'.
...
llvm-svn: 188483
2013-08-15 20:21:49 +00:00
David Blaikie
d0d6fcc923
DebugInfo: Prefer references over pointers, pass by const reference for a type that will grow in the future
...
llvm-svn: 188422
2013-08-14 22:23:05 +00:00
Carlo Kok
bac096a614
Output DW_AT_stmt_list dwarf debug info as DW_FORM_sec_offset instead of DW_FORM_data4 as it is a section offset (fixes the coff/dwarf debug info statement locations)
...
llvm-svn: 188297
2013-08-13 17:46:57 +00:00
Carlo Kok
fb849b0f21
For COFF only: dwarf debug info output a label reference as a section relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size.
...
llvm-svn: 188296
2013-08-13 17:45:53 +00:00
Evgeniy Stepanov
b59d82ac66
Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.
...
Before this, collectAttributes() was operating on a local object.
llvm-svn: 188254
2013-08-13 07:57:01 +00:00
Eric Christopher
d29614f98d
Add the start of DIE hashing for DWARF4 type units and split dwarf
...
CUs.
Currently only hashes the name of CUs and the names of any children,
but it's an obvious first step to show the framework. The testcase
should continue to be correct, however, as it's an empty TU.
llvm-svn: 188243
2013-08-13 01:21:55 +00:00
Eric Christopher
cede3db5ea
Reflow comment.
...
llvm-svn: 188233
2013-08-12 23:59:24 +00:00
Eric Christopher
166294f37a
Remove empty constructor.
...
llvm-svn: 188232
2013-08-12 23:59:18 +00:00
Eric Christopher
60eb7696a9
Move the addition of the dwo_id as late as possible after everything
...
has been finalized except for sizes and offsets. Update test accordingly.
llvm-svn: 188199
2013-08-12 20:27:48 +00:00
Eric Christopher
ac886fe0f8
Update the CMake build files.
...
llvm-svn: 188030
2013-08-08 23:51:31 +00:00
Eric Christopher
4573198b30
Move hash computation code into a separate class and file.
...
No functional change intended.
llvm-svn: 188028
2013-08-08 23:45:55 +00:00
Eric Christopher
056b647d1f
For DW_TAG_template_type_parameter the actual passed in type could
...
be void and therefore not have a type entry. Only add the type if
it is non-void and provide a testcase.
llvm-svn: 187966
2013-08-08 08:09:43 +00:00
Eric Christopher
49e17b2049
The conversion to bool is fine here, no need to check isType.
...
llvm-svn: 187964
2013-08-08 07:40:42 +00:00
Eric Christopher
0df08e2ff9
Make sure that if we're going to attempt to add a type to a DIE that
...
the type exists.
Fix up cases where we weren't checking for optional types and add
an assert to addType to make sure we catch this in the future.
Fix up a testcase that was using the tag for DW_TAG_array_type
when it meant DW_TAG_enumeration_type.
llvm-svn: 187963
2013-08-08 07:40:37 +00:00
Eric Christopher
afb2c4114e
Change variable name and reflow formatting.
...
llvm-svn: 187962
2013-08-08 07:40:31 +00:00
Eric Christopher
d25f7fc4ae
Reflow for loop.
...
llvm-svn: 187954
2013-08-08 01:41:05 +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
7af8baf678
Using the integrated assembler we'd fail to change section to the
...
.tbss section for zerofill thread locals. Make sure we do this
before emitting the zerofills.
Fixes PR15972.
llvm-svn: 187913
2013-08-07 21:13:06 +00:00
Eric Christopher
341770d7ea
Remove some parens. No functional change.
...
llvm-svn: 187872
2013-08-07 08:35:10 +00:00