| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 232484
|
|
|
|
| |
llvm-svn: 232429
|
|
|
|
|
|
|
|
| |
The information gathering part of the patch stores a bit more information
than what is strictly necessary for these 2 sections. The rest will
become useful when we start emitting __apple_* type accelerator tables.
llvm-svn: 232342
|
|
|
|
|
|
|
|
|
| |
Also, after looking at the raw_svector_stream internals, increase the
size of the SmallString used with it to prevent heap allocation.
Issue found by the Asan bot.
llvm-svn: 232335
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code comes with a lot of cruft that is meant to mimic darwin's
dsymutil behavior. A much simpler approach (described in the numerous
FIXMEs that I put in there) gives the right output for the vast
majority of cases. The extra corner cases that are handled differently
need to be investigated: they seem to correctly handle debug info that
is in the input, but that info looks suspicious in the first place.
Anyway, the current code needs to handle this, but I plan to revisit it
as soon as the big round of validation against the classic dsymutil is
over.
llvm-svn: 232333
|
|
|
|
| |
llvm-svn: 232305
|
|
|
|
|
|
|
|
|
|
|
|
| |
The debug map embedded by ld64 in binaries conatins function sizes.
These sizes are less precise than the ones given by the debug information
(byte granularity vs linker atom granularity), but they might cover code
that is referenced in the line table but not in the DIE tree (that might
very well be a compiler bug that I need to investigate later).
Anyway, extracting that information is necessary to be able to mimic
dsymutil's behavior exactly.
llvm-svn: 232300
|
|
|
|
|
|
|
|
| |
There is no need to look into the location expressions to transfer them,
the only modification to apply is to patch their base address to reflect
the linked function address.
llvm-svn: 232267
|
|
|
|
|
|
|
|
| |
This actually shares most of its implementation with the generation
of the debug_ranges (the absence of 'a' is not a typo) contribution
for the unit's DW_AT_ranges attribute.
llvm-svn: 232246
|
|
|
|
|
|
|
|
|
|
| |
The ID can eg. de used in MCSymbol names to differentiate the ones
that need to be created for every unit.
The ID is a constructor parameter and not a static class member so
there is no issue with counter updates if we decide to thread that
code.
llvm-svn: 232245
|
|
|
|
|
|
|
|
| |
Next time, when I fix a typo, I'll take the time to reread the whole
comment instead of waiting for the commit email to realize that there
is another one two words later...
llvm-svn: 232234
|
|
|
|
| |
llvm-svn: 232233
|
|
|
|
|
|
|
| |
Nothing fancy, just a straightforward offset to apply to the original
debug_ranges entries to get them in line with the linked addresses.
llvm-svn: 232232
|
|
|
|
| |
llvm-svn: 232231
|
|
|
|
|
|
|
|
|
|
| |
We recorded the forward references in the CU that holds the referenced
DIE, but this is wrong as those will get resoled *after* the CU that
holds the reference. Record the references in their originating CU along
with a pointer to the remote CU to be able to compute the fixed up
offset at the right time.
llvm-svn: 232193
|
|
|
|
|
|
|
| |
They need to be handled specifically as they could vary pretty
widely depending on how the linker moves functions around.
llvm-svn: 232192
|
|
|
|
|
|
|
|
| |
The typo got unnoticed because we were testing only on Dwarf 2. Add a
Dwarf4 test that exercises the code path, and also tests some newer
FORMs that the other test doesn't cover.
llvm-svn: 232191
|
|
|
|
|
|
|
|
| |
This reverts commit r231967 which reinstates r231957.
Now that IntervalMap uses explicitely aligned storage, it should be safe.
llvm-svn: 232080
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r231957.
IntervalMap currently doesn't support keys more aligned than host pointers
and I've been using it with uint64_t keys. This asserts on some 32bits
systems.
Revert while I work on an IntervalMap generalization.
llvm-svn: 231967
|
|
|
|
|
|
| |
No build failure, found by code inspection.
llvm-svn: 231958
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gather the function ranges [low_pc, high_pc) during DIE selection and
store them along with the offset to apply to them to get the linked
addresses.
This is just the data collection part, it comes with no tests. That
information will be used in multiple followup commits to perform the
relocation of line tables and range sections among other things, and
these commits will add tests.
llvm-svn: 231957
|
|
|
|
| |
llvm-svn: 231956
|
|
|
|
|
|
|
| |
DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.
llvm-svn: 231955
|
|
|
|
|
|
|
| |
update all ports accordingly. Required a couple of small rewrites
in handling subtarget features during creation in PPC.
llvm-svn: 231861
|
|
|
|
|
|
| |
warning; NFC.
llvm-svn: 231567
|
|
|
|
| |
llvm-svn: 231566
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing this gets function's low_pc and global variable's locations right
in the output debug info. It also could get right other attributes
that need to be relocated (in linker terms), but I don't know of any
other than the address attributes.
This doesn't fixup low_pc attributes in compile_unit, lexical_block
or inlined subroutine, nor does it get right high_pc attributes
for function. This will come in a subsequent commit.
llvm-svn: 231544
|
|
|
|
|
|
|
|
|
|
| |
Reference attributes are mainly handled by just creating DIEEntry
attributes for them. There is a special case for DW_FORM_ref_addr
attributes though, because the DIEEntry code needs a DwarfDebug
code to emit them (and we don't have one as we do no CodeGen).
In that case, just use DIEInteger attributes with the right form.
llvm-svn: 231531
|
|
|
|
|
|
|
|
|
|
| |
The start offset of a linked unit is known before starting to clone
its DIEs. Handling DW_FORM_ref_addr attributes requires that this
offset is set while cloning the unit. Split CompileUnit::computeOffsets()
into setStartOffset() and computeNextUnitOffset() and call them
repsectively before cloning the DIEs and right after.
llvm-svn: 231530
|
|
|
|
|
|
| |
With this comes the ability to correctly clone string attributes in DIEs.
llvm-svn: 231493
|
|
|
|
|
|
|
|
|
|
|
| |
accept to default them"
This reverts commit r231350.
It turns out MSVC doesn't generate implicit move constructors and also doesn't accept to default them...
See for example http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/2786
llvm-svn: 231351
|
|
|
|
|
|
| |
default them
llvm-svn: 231350
|
|
|
|
| |
llvm-svn: 231303
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds code to emit DIE trees that have been pruned from the
parts that haven't been marked as kept in the previous pass.
It works by 'cloning' the input DIE tree (as read by libDebugInfoDwarf)
into a tree of DIE objects. Cloning the DIEs means essentially cloning
their attributes. The code in this commit does only handle scalar and
block attributes (scalar because they are trivial, blocks because they
can't be easily replaced by a scalr placeholder), all the other ones
are replaced by placeholder zero values and will be handled in
further commits.
The added tests mostly check that the DIE tree has the correct layout and
also verify that a few chosen scalar and block attributes correctly make
their way into the output.
llvm-svn: 231300
|
|
|
|
| |
llvm-svn: 230826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This class is responsible for getting the linked data to the
disk in the appropriate form. Today it it an empty shell that
just instantiates an MC layer.
As we do not put anything in the resulting file yet, we just
check it has the right architecture (and check that -o does
the right thing).
To be able to create all the components, this commit adds a
few dependencies to llvm-dsymutil, namely all-targets, MC and
AsmPrinter.
Also add a -no-output option, so that tests that do not need
the binary result can continue to run even if they do not have
the required target linked in.
llvm-svn: 230824
|
|
|
|
|
|
|
| |
The only option we have to pass down currently is verbosity, but there
are more to come.
llvm-svn: 230823
|
|
|
|
| |
llvm-svn: 230822
|
|
|
|
|
|
| |
We do not create the output file yet, so no means to test.
llvm-svn: 230821
|
|
|
|
|
|
|
|
|
| |
...and reimplement DwarfLinker::reportWarning in terms of it. Other
compenents than the DwarfLinker will need to report warnings, and I'm
about to add a similar "error()" helper at the same global level so
make that consistent.
llvm-svn: 230820
|
|
|
|
| |
llvm-svn: 230819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this commit, llvm-dsymutil learns how to choose which DIEs
it will link in the final output and which ones it won't. This
is based on the 'valid relocation' information that has been
built in the previous commits.
The test only tests that we choose the right 'root DIEs'. The
selection algorithm (and especially the part that walk the
dependencies of a root DIE) lacks a bit test coverage. This
will be much easier to cover when we output actual Dwarf and
thus can use llvm-dwarfdump to verify the structure of the
emitted DIE trees. I'll add more tests then.
llvm-svn: 229183
|
|
|
|
| |
llvm-svn: 229182
|
|
|
|
|
|
|
| |
To be used in subsequent commits (separated to keep only core logic
in the follow-ups).
llvm-svn: 229181
|
|
|
|
| |
llvm-svn: 229180
|
|
|
|
|
|
|
|
| |
These 'valid relocations' in the debug_info section will be how
dsymutil identifies the DIEs it needs to keep in the linked debug
information.
llvm-svn: 229178
|
|
|
|
|
|
|
| |
It turns out the debug map will be interogated both by name and
by object file address. Add the latter capability.
llvm-svn: 229177
|
|
|
|
|
|
| |
script. This is in preparation for changes to lots of include lines.
llvm-svn: 229088
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.
This is purely a mechanical / build system change.
Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher
llvm-svn: 227586
|
|
|
|
|
|
|
|
|
|
| |
The libDebugInfo DIE parsing doesn't store these relationships, we have to
recompute them. This commit introduces the CompileUnit bookkeeping class to
store this data. It will be expanded with more fields in the future.
No tests as this produces no visible output.
llvm-svn: 227382
|