Eric Christopher
8b1e5d62d8
Don't use a debug location for frame setup instructions in the
...
prologue. Also skip frame setup instructions when looking for the
first location.
llvm-svn: 165052
2012-10-02 21:17:00 +00:00
Eric Christopher
b67c16fe92
Have the DbgVariable "isArtificial" and "isObjectPointer" not
...
care about it being an argument variable so that we can decide
that captured block and lambda vars that don't happen to
be arguments could be an argument pointer.
Add the object pointer for one case onto the subprogram die.
rdar://12001329
llvm-svn: 164419
2012-09-21 22:18:52 +00:00
Eric Christopher
853a000638
Recommit, with fixes:
...
Add some support for dealing with an object pointer on arguments.
Part of rdar://9797999
which now supports adding the object pointer attribute to the
subprogram as it should.
llvm-svn: 163754
2012-09-12 23:36:19 +00:00
Eric Christopher
e2dae503e6
Revert "Add some support for dealing with an object pointer on arguments."
...
This should be done on the subprogram, not the variable itself.
llvm-svn: 163734
2012-09-12 18:42:31 +00:00
Eric Christopher
9a8f37667b
Add some support for dealing with an object pointer on arguments.
...
Part of rdar://9797999
llvm-svn: 163667
2012-09-12 00:26:55 +00:00
Eric Christopher
5fe521ef3a
Revert r160148 it seems to cause more problems than it should
...
right now. We'll fix PR13303 a different way.
llvm-svn: 163570
2012-09-10 23:34:06 +00:00
Eric Christopher
91aebc4188
80-col fixup.
...
llvm-svn: 163568
2012-09-10 23:34:00 +00:00
Eric Christopher
c774770535
No reason to construct this twice.
...
llvm-svn: 163567
2012-09-10 23:33:57 +00:00
Eric Christopher
4e278d30eb
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
Eric Christopher
b5562e6c57
Turn these two options in to trinary state so that they can be
...
turned on and off separate from the platform if you're on darwin.
llvm-svn: 162487
2012-08-23 22:36:40 +00:00
Eric Christopher
797ebecc1a
Add a flag to DwarfDebug to allow it to communicate whether or not
...
we're using the darwin old gdb compat mode for emitting dwarf.
llvm-svn: 162486
2012-08-23 22:36:36 +00:00
Eric Christopher
6912c7ac81
Typo.
...
llvm-svn: 162438
2012-08-23 07:32:06 +00:00
Eric Christopher
398a6612e1
Only emit the __debug_inlined section if we're trying to be compatible
...
with older gdbs on darwin.
rdar://10975874
llvm-svn: 162436
2012-08-23 07:32:02 +00:00
Eric Christopher
09caadf6c2
Emit pubtypes only when going for darwin gdb compatibility.
...
rdar://10393214
llvm-svn: 162434
2012-08-23 07:10:56 +00:00
Eric Christopher
4286603255
Add an option for darwin gdb compatibility.
...
llvm-svn: 162432
2012-08-23 07:10:46 +00:00
Eric Christopher
dde7784606
Temporarily revert c23b933d5f8be9b51a1d22e717c0311f65f87dcd. It's causing
...
failures in the debug testsuite and possibly PR13486.
llvm-svn: 161121
2012-08-01 18:19:01 +00:00
Eric Christopher
acd91c534d
Add a DW_AT_high_pc for CUs that are a single address range. Update
...
all tests accordingly.
Fixes PR13351.
Patch by shinichiro hamaji!
llvm-svn: 160899
2012-07-27 22:00:05 +00:00
Eric Christopher
2db5457cb8
The end of the prologue should be marked with is_stmt.
...
Fixes PR13303.
Patch by Paul Robinson!
llvm-svn: 160148
2012-07-12 23:30:25 +00:00
Alexey Samsonov
195a9e9c55
Fix PR13202 and a regtest.
...
DwarfDebug class could generate the same (inlined) DIVariable twice:
1) when trying to find abstract debug variable for a concrete inlined instance.
2) when explicitly collecting info for variables that were optimized out.
This change makes sure that this duplication won't happen and makes
Clang pass "gdb.opt/inline-locals" test from gdb testsuite.
Reviewed by Eric Christopher.
llvm-svn: 159811
2012-07-06 08:45:08 +00:00
Bill Wendling
74b96ac7b8
The DIBuilder class is just a wrapper around debug info creation
...
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore
instead.
llvm-svn: 159414
2012-06-29 08:32:07 +00:00
Bill Wendling
e8949ecfa6
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
Rafael Espindola
13084dd6a3
Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same as
...
DwarfUsesRelocationsAcrossSections.
llvm-svn: 158992
2012-06-22 13:24:07 +00:00
Nick Lewycky
da52706728
Emit relocations for DW_AT_location entries on systems which need it. This is
...
a recommit of r127757. Fixes PR9493. Patch by Paul Robinson!
llvm-svn: 158957
2012-06-22 01:25:12 +00:00
Benjamin Kramer
bbdde33ff0
Allocate the contents of DwarfDebug's StringMaps in a single big BumpPtrAllocator.
...
llvm-svn: 158265
2012-06-09 10:34:15 +00:00
Jakob Stoklund Olesen
be0b8939c0
Switch all register list clients to the new MC*Iterator interface.
...
No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.
This makes it possible to do so without changing all clients (again).
llvm-svn: 157854
2012-06-01 23:28:30 +00:00
Eric Christopher
01248cbb6f
Remove duplicate code that we could just fallthrough to.
...
llvm-svn: 157060
2012-05-18 18:24:15 +00:00
Eric Christopher
218078152b
Fix thinko in conditional.
...
Part of rdar://11352000 and should bring the buildbots back.
llvm-svn: 156421
2012-05-08 21:24:39 +00:00
Eric Christopher
63b73ede75
Handle OpDeref in case it comes in as a register operand.
...
Part of rdar://11352000
llvm-svn: 156405
2012-05-08 18:56:00 +00:00
Eric Christopher
2e17b32e69
Patch to set is_stmt a little better for prologue lines in a function.
...
This enables debuggers to see what are interesting lines for a
breakpoint rather than any line that starts a function.
rdar://9852092
llvm-svn: 154120
2012-04-05 20:39:05 +00:00
Eric Christopher
53ef0cf4a5
Fix thinko check for number of operands to be the one that actually
...
might have more than 19 operands. Add a testcase to make sure I
never screw that up again.
Part of rdar://11026482
llvm-svn: 153961
2012-04-03 17:55:42 +00:00
Eric Christopher
ba40985484
Add a line number for the scope of the function (starting at the first
...
brace) so that we get more accurate line number information about the
declaration of a given function and the line where the function
first starts.
Part of rdar://11026482
llvm-svn: 153916
2012-04-03 00:43:49 +00:00
Eric Christopher
6c4e6016b5
Turn on the accelerator tables for Darwin.
...
llvm-svn: 153880
2012-04-02 17:58:52 +00:00
Eric Christopher
5f34828440
Use DW_AT_low_pc for a single entry point into a routine.
...
Fixes PR10105
llvm-svn: 153524
2012-03-27 18:35:54 +00:00
Eric Christopher
c1784e9de8
Use the file in the inlined die rather than the compile unit for
...
backtrace locations.
Testcase forthcoming, but I wanted to get some testing here.
Should fix:
PR12323
PR12314
rdar://11091100
llvm-svn: 153471
2012-03-26 21:38:38 +00:00
Benjamin Kramer
c798b7be6d
DwarfDebug: Store the filename/dirname pair as a zero-separated string in a stringmap, instead of using a highly inefficient std::map of a pair of std::strings.
...
llvm-svn: 152541
2012-03-11 14:56:26 +00:00
Craig Topper
8cc9d75c6a
Use uint16_t to store register overlaps to reduce static data.
...
llvm-svn: 152001
2012-03-04 10:43:23 +00:00
Eric Christopher
bb8f3701cd
Grammar-o in function name.
...
llvm-svn: 151875
2012-03-02 02:11:47 +00:00
Eric Christopher
a634c38544
If the linkage name doesn't exist we're supposed to emit a reference
...
to the string table for the function name, not the function name.
llvm-svn: 151873
2012-03-02 01:57:52 +00:00
Eric Christopher
39493f0f97
Revert "Reorder the sections being output to reduce the number of assembler"
...
The inline table needs to be constructed ahead of time so that it doesn't try to
create new strings while we're emitting everything.
This reverts commit a8ff9bccb399183cdd5f1c3cec2bda763664b4b0.
llvm-svn: 151864
2012-03-02 00:30:24 +00:00
Eric Christopher
3d271eb540
Reorder the sections being output to reduce the number of assembler
...
fixups that are being used to determine section offsets. Reduces
the total number of fixups by 50% for a non-trivial testcase.
Part of rdar://10413936
llvm-svn: 151852
2012-03-01 22:50:31 +00:00
Michael J. Spencer
0eb4a851f6
Minimal changes for LLVM to compile under VS11.
...
llvm-svn: 151849
2012-03-01 22:42:52 +00:00
Eric Christopher
32802595f6
Add the source language into the compile unit.
...
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Craig Topper
d218e7cb60
Convert assert(0) to llvm_unreachable
...
llvm-svn: 149816
2012-02-05 08:31:47 +00:00
Eric Christopher
afc99847bf
Remove generation of DW_AT_sibling. Nothing as far as I can tell uses it.
...
Saves about 1.5% on debug info size.
rdar://10278198
llvm-svn: 148794
2012-01-24 09:43:28 +00:00
Eric Christopher
354c1a6691
Use const vector references instead of a vector copy. Spotted by Devang.
...
llvm-svn: 147694
2012-01-06 23:03:34 +00:00
Eric Christopher
3f80f9acaa
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
945c822d26
Extraneous whitespace and 80-col.
...
llvm-svn: 146780
2011-12-16 23:42:31 +00:00
Eric Christopher
5697266013
Add inline subprogram names to the name lookup table since they may
...
not get there any other way.
llvm-svn: 145789
2011-12-04 06:02:38 +00:00
Nick Lewycky
7d0d3c2d58
Move global variables in TargetMachine into new TargetOptions class. As an API
...
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
llvm-svn: 145714
2011-12-02 22:16:29 +00:00
Rafael Espindola
5f6b14719f
The dwarf standard says that the only differences between a out-of-line
...
instance and a concrete inlined instance are the use of DW_TAG_subprogram
instead of DW_TAG_inlined_subroutine and the who owns the tree.
We were also omitting DW_AT_inline from the abstract roots. To fix this,
make sure we mark abstract instance roots with DW_AT_inline even when
we have only out-of-line instances referring to them with DW_AT_abstract_origin.
FileCheck is not a very good tool for tests like this, maybe we should add
a -verify mode to llvm-dwarfdump.
llvm-svn: 144441
2011-11-12 01:57:54 +00:00
Rafael Espindola
e7024f983a
Check in getOrCreateSubprogramDIE if a declaration exists and if so output
...
it first.
This is a more general fix to pr11300.
llvm-svn: 144324
2011-11-10 22:34:29 +00:00
Eric Christopher
204348c454
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
60be243dc5
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
Benjamin Kramer
71e3909e9c
Add comments.
...
llvm-svn: 144194
2011-11-09 18:16:11 +00:00
Benjamin Kramer
64e040aef6
Take advantage of the zero byte in StringMap when emitting dwarf stringpool entries.
...
llvm-svn: 144184
2011-11-09 12:12:04 +00:00
Eric Christopher
c916a28d7f
Remove the pubnames section, no one consumes it.
...
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Eric Christopher
eba4abd2aa
Also add the linkage name to the name accelerator tables if it exists
...
and is different than the normal name.
llvm-svn: 144130
2011-11-08 21:56:23 +00:00
Eric Christopher
9fc74dc3f8
Add the base ObjC method name to the names lookup table as well.
...
llvm-svn: 144105
2011-11-08 19:16:01 +00:00
Eric Christopher
37cd1659cb
Add all completed and named types to the dwarf type accelerator tables.
...
llvm-svn: 144027
2011-11-07 22:11:16 +00:00
Eric Christopher
2b26dd515a
Use StringRef::startswith to do some string comparisons.
...
llvm-svn: 143982
2011-11-07 18:53:23 +00:00
Eric Christopher
27787a743e
Allow for the case where the name of the subprogram is "".
...
Fixes a self-host error.
llvm-svn: 143970
2011-11-07 18:10:17 +00:00
Eric Christopher
fddc6980b7
Remove unnecessary addition to API. Replace with something much simpler.
...
llvm-svn: 143925
2011-11-07 09:38:42 +00:00
Eric Christopher
f9c4db49bd
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
64ea0f378b
Expose a way to get the beginning of the dwarf string section.
...
llvm-svn: 143920
2011-11-07 09:18:38 +00:00
Eric Christopher
e0fc702988
Fix up comment.
...
llvm-svn: 143919
2011-11-07 09:18:35 +00:00
Rafael Espindola
a022f4813e
Emit declarations before definitions if they are available. This causes DW_AT_specification to
...
point back in the file in the included testcase. Fixes PR11300.
llvm-svn: 143726
2011-11-04 19:00:29 +00:00
Nick Lewycky
691d7f80c2
Don't emit a directory entry for the value in DW_AT_comp_dir, that is always
...
implied by directory index zero.
llvm-svn: 143570
2011-11-02 20:55:33 +00:00
Nick Lewycky
651475977d
Teach our Dwarf emission to use the string pool.
...
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Nick Lewycky
4aa5a52a80
Reflow lines, fix comments for doxygen style, fix whitespace. No functionality
...
change.
llvm-svn: 143074
2011-10-26 22:55:33 +00:00
Nick Lewycky
d8f16be86a
Minor style cleanup, no functionality change.
...
llvm-svn: 142307
2011-10-17 23:27:36 +00:00
Nick Lewycky
c551c1c5f9
Add support for a new extension to the .file directive:
...
.file filenumber "directory" "filename"
This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.
llvm-svn: 142300
2011-10-17 23:05:28 +00:00
Eric Christopher
57c57a3260
Add a new wrapper node for a DILexicalBlock that encapsulates it and a
...
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.
This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.
Part of rdar://10246360
llvm-svn: 141729
2011-10-11 22:59:11 +00:00
Eric Christopher
d34e1d8bb6
Typo.
...
llvm-svn: 141004
2011-10-03 15:49:16 +00:00
Devang Patel
e4127d626e
Do not use named md nodes to track variables that are completely optimized. This does not scale while doing LTO with debug info. New approach is to include list of variables in the subprogram info directly.
...
llvm-svn: 138145
2011-08-19 23:28:12 +00:00
Devang Patel
68d2232bfe
Eliminate unnecessary forwarding function.
...
llvm-svn: 138006
2011-08-18 23:17:55 +00:00
Devang Patel
630d8ce36b
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
28ad105008
Remove unnecessary version check.
...
llvm-svn: 137728
2011-08-16 17:41:41 +00:00
Devang Patel
00c82827ab
Refactor.
...
llvm-svn: 137689
2011-08-15 23:47:24 +00:00
Devang Patel
822410da56
Continue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of getCompileUnit().
...
llvm-svn: 137683
2011-08-15 23:36:40 +00:00
Devang Patel
e0aa92d509
This is somewhat déjà-vu, but avoid using getCompileUnit() as much as possible.
...
llvm-svn: 137668
2011-08-15 22:24:32 +00:00
Devang Patel
8fe83ecaf3
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
f5e3a86ea0
There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.
...
llvm-svn: 137659
2011-08-15 21:43:21 +00:00
Devang Patel
9ea2ce9b7b
Fix warning.
...
llvm-svn: 137658
2011-08-15 21:35:16 +00:00
Devang Patel
1113107823
Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
...
llvm-svn: 137656
2011-08-15 21:24:36 +00:00
Devang Patel
7e0fc7cf86
Simplify mapping to variable from its abstract variable info.
...
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.
llvm-svn: 137637
2011-08-15 19:01:20 +00:00
Devang Patel
2b6f546226
Refactor.
...
llvm-svn: 137632
2011-08-15 18:40:16 +00:00
Devang Patel
84b2564244
Refactor.
...
llvm-svn: 137631
2011-08-15 18:35:42 +00:00
Devang Patel
1b73744344
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
ec9a83977b
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
5901733259
Use ArrayRef.
...
llvm-svn: 137485
2011-08-12 18:10:19 +00:00
Benjamin Kramer
de2c60be28
Plug a memory leak.
...
llvm-svn: 137321
2011-08-11 18:39:28 +00:00
Devang Patel
504551c7bf
Stay within 80 columns.
...
llvm-svn: 137283
2011-08-10 23:58:09 +00:00
Devang Patel
1541972a13
Distinguish between two copies of one inlined variable. Take 2.
...
llvm-svn: 137253
2011-08-10 21:50:54 +00:00
Devang Patel
5a1dd582e2
Revert unintentional parts of previous check-in.
...
llvm-svn: 137249
2011-08-10 21:16:49 +00:00
Devang Patel
de73daa98c
Start using LexicalScopes utility. No intetional functionality change.
...
llvm-svn: 137246
2011-08-10 20:55:27 +00:00
Devang Patel
bc9a3e12d9
Simplify by creating parent first.
...
llvm-svn: 137056
2011-08-08 18:22:10 +00:00
Chandler Carruth
e833bbd11e
Temporarily revert r135528 which distinguishes between two copies of one
...
inlined variable, based on the discussion in PR10542.
This explodes the runtime of several passes down the pipeline due to
a large number of "copies" remaining live across a large function. This
only shows up with both debug and opt, but when it does it creates
a many-minute compile when self-hosting LLVM+Clang. There are several
other cases that show these types of regressions.
All of this is tracked in PR10542, and progress is being made on fixing
the issue. Once its addressed, the re-instated, but until then this
restores the performance for self-hosting and other opt+debug builds.
Devang, let me know if this causes any trouble, or impedes fixing it in
any way, and thanks for working on this!
llvm-svn: 136953
2011-08-05 00:51:31 +00:00
Bob Wilson
03c734d202
Some revisions to Devang's change r136759 for merged global debug info.
...
llvm-svn: 136802
2011-08-03 19:42:51 +00:00
Devang Patel
99a2f0d98c
Use byte offset, instead of element number, to access merged global.
...
llvm-svn: 136759
2011-08-03 01:25:46 +00:00
Nick Lewycky
cec151e7b6
Fix a lot of typos, improve (but not necessarily fix) grammaros and reflow some
...
lines. No functionality change.
llvm-svn: 136458
2011-07-29 03:49:23 +00:00
Devang Patel
a31c9d991e
Remove outdated FIXME comment.
...
llvm-svn: 136275
2011-07-27 22:00:01 +00:00
Devang Patel
e85a416d4e
It is quiet possible that inlined function body is split into multiple chunks of consequtive instructions. But, there is not any way to describe this in .debug_inline accelerator table used by gdb. However, describe non contiguous ranges of inlined function body appropriately using AT_range of DW_TAG_inlined_subroutine debug info entry.
...
llvm-svn: 136196
2011-07-27 00:34:13 +00:00
Devang Patel
5589e89f0c
While extracting lexical scopes from machine instruction stream, work on one machine basic block at a time.
...
llvm-svn: 136106
2011-07-26 18:09:53 +00:00
Devang Patel
bf27de8340
Refactor.
...
llvm-svn: 135633
2011-07-20 23:00:27 +00:00
Devang Patel
284b502be9
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.
...
llvm-svn: 135629
2011-07-20 22:18:50 +00:00
Devang Patel
65afdd27d0
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Devang Patel
647ad13add
Use DebugLoc directly to map inlined functions' instructions to respective lexical scope.
...
llvm-svn: 135302
2011-07-15 21:25:44 +00:00
Devang Patel
d539f30c73
Eliminate redundant map.
...
llvm-svn: 135278
2011-07-15 16:38:42 +00:00
Evan Cheng
b43f66dcd3
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.
...
llvm-svn: 135254
2011-07-15 06:26:35 +00:00
Devang Patel
7c5092d1c2
Do not get confused by multiple empty lexical scopes inlined at one location.
...
llvm-svn: 135232
2011-07-15 00:30:39 +00:00
Devang Patel
44a684072d
Refactor.
...
llvm-svn: 135212
2011-07-14 23:17:49 +00:00
Devang Patel
ccc8ba373c
Eliminate redundant LLVMContext argument.
...
Improve DbgScope->dump() output.
llvm-svn: 135207
2011-07-14 22:30:56 +00:00
Devang Patel
39f6e21de3
Simplify.
...
llvm-svn: 135127
2011-07-14 01:52:45 +00:00
Devang Patel
1856a523ea
Simplify and delay extracting DebugLoc elements, scope and InlinedAt, as much as possible.
...
llvm-svn: 135124
2011-07-14 01:14:57 +00:00
Devang Patel
cb54f643e9
Simplify. Compile unit check inside hasValidLocation() did not add any value.
...
llvm-svn: 135118
2011-07-14 00:20:24 +00:00
Devang Patel
8d1207dc18
Fix typo in DEBUG message.
...
llvm-svn: 135111
2011-07-14 00:04:53 +00:00
Devang Patel
b9fe59ad12
Add DEBUG messages.
...
llvm-svn: 135110
2011-07-14 00:03:58 +00:00
Devang Patel
31505d2d78
Refactor.
...
llvm-svn: 134703
2011-07-08 17:09:57 +00:00
Devang Patel
756482ca98
Make provision to have floating point constants in .debug_loc expressions.
...
llvm-svn: 134702
2011-07-08 16:49:43 +00:00
Devang Patel
f97af90b4a
Add DEBUG message.
...
llvm-svn: 134643
2011-07-07 21:44:42 +00:00
Devang Patel
a30ca05040
Add DEBUG messages.
...
llvm-svn: 134572
2011-07-07 00:14:27 +00:00
Devang Patel
94f4eec7e4
Remove dead code.
...
llvm-svn: 134561
2011-07-06 23:26:18 +00:00
Devang Patel
91fee59b74
Handle debug info for i128 constants.
...
llvm-svn: 133821
2011-06-24 20:46:11 +00:00
Benjamin Kramer
3bd28deb10
Use path API for path concatenation.
...
llvm-svn: 132668
2011-06-05 14:36:47 +00:00
Devang Patel
03708bbb55
A DBG_VALUE that truncates a range does not start another dbg value range.
...
llvm-svn: 132433
2011-06-01 23:00:17 +00:00
Devang Patel
1a3058d727
Do not drop constant values when a variable's content is described using .debug_loc entries.
...
llvm-svn: 132427
2011-06-01 22:03:25 +00:00
Devang Patel
a9f6a46390
Include global types, that are referenced through local variables, in debug_pubtypes list.
...
llvm-svn: 132371
2011-05-31 22:56:51 +00:00
Rafael Espindola
2230168a0f
Make size computation less brittle.
...
llvm-svn: 132222
2011-05-27 22:05:41 +00:00
Devang Patel
62a7038a9f
Select DW_AT_const_value size based on variable size.
...
llvm-svn: 132193
2011-05-27 16:45:18 +00:00
Devang Patel
5bce258c3d
Fix debug info for blocks' variable.
...
llvm-svn: 131940
2011-05-24 00:22:25 +00:00
Devang Patel
8a90970a54
Remove unnecessary comment.
...
llvm-svn: 131936
2011-05-23 23:16:14 +00:00
Devang Patel
344808fbe5
Identify end of prologue (and beginning of function body) using DW_LNS_set_prologue_end line table opcode.
...
llvm-svn: 131194
2011-05-11 19:22:19 +00:00
Rafael Espindola
9b3e6a9cb4
Rename DwarfRequiresRelocationForStmtList to
...
DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList.
llvm-svn: 131148
2011-05-10 20:35:05 +00:00
Devang Patel
38193e7550
Do not ignore InlinedAt while walking up scope chain to find subprogram node.
...
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Devang Patel
188fd17fe4
Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp
...
llvm-svn: 130991
2011-05-06 16:57:54 +00:00
Rafael Espindola
59462d8ae3
Dead code elimination.
...
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Devang Patel
99147805e4
Remove little used statistical counter.
...
llvm-svn: 130955
2011-05-05 22:00:08 +00:00
Devang Patel
3d0c5dc9fd
If debug info for inlined function is missing then handle it gracefully.
...
llvm-svn: 130933
2011-05-05 17:54:26 +00:00
Rafael Espindola
8346c59e6a
Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
...
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.
While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.
llvm-svn: 130846
2011-05-04 17:44:06 +00:00
Devang Patel
a6e69a5541
Tighten up check for empty (i.e. no meaningful debug info) module. This fixes dwarf-die2.c test case from gcc test suite.
...
llvm-svn: 130842
2011-05-04 16:34:02 +00:00
Devang Patel
3506ad5c7f
Even if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite.
...
llvm-svn: 130794
2011-05-03 21:50:34 +00:00
Devang Patel
2d8861a690
If the front end has emitted llvm.dbg.cu and other debug info anchors (clang does it now) then use them directly. This saves one scan of entire module, to collect debug info, which in turns saves few machine cycles at compile time.
...
llvm-svn: 130759
2011-05-03 16:45:22 +00:00
Devang Patel
7d7ac5512a
Emit debug info for global variables first.
...
This works around a limitation in gdb which is reported by following inherit.exp test failures from gdb testsuite.
gdb.cp/inherit.exp: print g_vB.vB::vb
gdb.cp/inherit.exp: print g_vB.vB::vx
gdb.cp/inherit.exp: print g_vC.vC::vc
gdb.cp/inherit.exp: print g_vC.vC::vx
gdb.cp/inherit.exp: print g_vD.vB::vb
...
llvm-svn: 130702
2011-05-02 18:19:17 +00:00
Devang Patel
900ceb725b
Teach dwarf writer to handle complex address expression for .debug_loc entries.
...
This fixes clang generated blocks' variables' debug info.
Radar 9279956.
llvm-svn: 130373
2011-04-28 02:22:40 +00:00
Devang Patel
42736cb058
Simplify handling of variables with complex address (i.e. blocks variables)
...
llvm-svn: 130339
2011-04-27 22:45:24 +00:00
Devang Patel
3da97b7d34
Rename a local variable.
...
llvm-svn: 130171
2011-04-25 23:05:21 +00:00
Devang Patel
e28211b031
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
b1b33d6569
Do not drop a variable's complex address if it is not based on frame base.
...
Observed this while reading code, so I do not have a test case handy here.
llvm-svn: 130167
2011-04-25 22:52:55 +00:00
Devang Patel
929bbb6bf9
Let front-end tie subprogram declaration with subprogram definition directly.
...
llvm-svn: 130028
2011-04-22 23:10:17 +00:00
Devang Patel
6aac901f77
Do not leak argument's DbgVariables.
...
llvm-svn: 130004
2011-04-22 18:09:57 +00:00