aboutsummaryrefslogtreecommitdiffstats
path: root/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* Fix the representation of debug line table in DebugInfo LLVM library,Alexey Samsonov2012-08-072-0/+6
| | | | | | | | | | | | | | and "instruction address -> file/line" lookup. Instead of plain collection of rows, debug line table for compilation unit is now treated as the number of row ranges, describing sequences (series of contiguous machine instructions). The sequences are not always listed in the order of increasing address, so previously used std::lower_bound() sometimes produced wrong results. Now the instruction address lookup consists of two stages: finding the correct sequence, and searching for address in range of rows for this sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161414 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert c23b933d5f8be9b51a1d22e717c0311f65f87dcd. It's causingEric Christopher2012-08-0110-47/+23
| | | | | | failures in the debug testsuite and possibly PR13486. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161121 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a DW_AT_high_pc for CUs that are a single address range. UpdateEric Christopher2012-07-2710-23/+47
| | | | | | | | | | all tests accordingly. Fixes PR13351. Patch by shinichiro hamaji! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160899 91177308-0d34-0410-b5e6-96231b3b80d8
* test/DebugInfo/dwarfdump-test.test: Tweak expressions for Win32 to match ↵NAKAMURA Takumi2012-07-191-8/+8
| | | | | | | | | | | | backslashes. They are still odd, though. For example, Paths are printed on Win32 as below; /tmp/dbginfo\def2.cc:4:0 /tmp/dbginfo\include\decl2.h:1:0 /tmp/include\decl.h:5:0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160505 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo library: add support for fetching absolute paths to source filesAlexey Samsonov2012-07-194-7/+17
| | | | | | | | | (instead of basenames) from DWARF. Use this behavior in llvm-dwarfdump tool. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160496 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve behavior of DebugInfoEntryMinimal::getSubprogramName() introduced in ↵Alexey Samsonov2012-07-173-1/+6
| | | | | | | | | | | | r159512. To fetch a subprogram name we should not only inspect the DIE for this subprogram, but optionally inspect its specification, or its abstract origin (even if there is no inlining), or even specification of an abstract origin. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160365 91177308-0d34-0410-b5e6-96231b3b80d8
* The end of the prologue should be marked with is_stmt.Eric Christopher2012-07-121-0/+28
| | | | | | | | Fixes PR13303. Patch by Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160148 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR13202 and a regtest.Alexey Samsonov2012-07-061-0/+57
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159811 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-021-1/+1
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159544 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF ↵Alexey Samsonov2012-07-023-0/+25
| | | | | | | | | | parser: 1) DIContext is now able to return function name for a given instruction address (besides file/line info). 2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag). 3) test case that checks the basic functionality of llvm-dwarfdump added git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159512 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit relocations for DW_AT_location entries on systems which need it. This isNick Lewycky2012-06-221-0/+111
| | | | | | | a recommit of r127757. Fixes PR9493. Patch by Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158957 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for enum forward declarations.Eric Christopher2012-06-011-0/+22
| | | | | | Part of rdar://11570854 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157786 91177308-0d34-0410-b5e6-96231b3b80d8
* Have getOrCreateSubprogramDIE store the DIE for a subprogramPeter Collingbourne2012-05-271-0/+238
| | | | | | | | | definition in the map before calling itself to retrieve the DIE for the declaration. Without this change, if this causes getOrCreateSubprogramDIE to be recursively called on the definition, it will create multiple DIEs for that definition. Fixes PR12831. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157541 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for C++11 enum classes in llvm.Eric Christopher2012-05-231-0/+45
| | | | | | Part of rdar://11496790 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157303 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually support DW_TAG_rvalue_reference_type that we were tryingEric Christopher2012-05-191-0/+40
| | | | | | | | to generate out of the front end. rdar://11479676 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157094 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle OpDeref in case it comes in as a register operand.Eric Christopher2012-05-081-0/+89
| | | | | | Part of rdar://11352000 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156405 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Use StackRegister instead of FrameRegister in getFrameIndexReference ↵Alexey Samsonov2012-05-011-0/+42
| | | | | | (to generate debug info for local variables) if stack needs realignment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155917 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to set is_stmt a little better for prologue lines in a function.Eric Christopher2012-04-051-2/+4
| | | | | | | | | This enables debuggers to see what are interesting lines for a breakpoint rather than any line that starts a function. rdar://9852092 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154120 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix thinko check for number of operands to be the one that actuallyEric Christopher2012-04-031-0/+47
| | | | | | | | | might have more than 19 operands. Add a testcase to make sure I never screw that up again. Part of rdar://11026482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153961 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the output of the DW_TAG_friend tag to include DW_AT_friendEric Christopher2012-03-281-0/+47
| | | | | | | | and not the rest of the member tag. Fixes PR11695 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153570 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for the previous commit. Also, remove two tests that wereEric Christopher2012-03-272-9/+31
| | | | | | | testing a) the wrong behavior or b) something that I'm already testing in the new test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153525 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-251-8/+1
| | | | | | | | | | | | | | | | | | * Removed test/lib/llvm.exp - it is no longer needed * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files left in the test suite so this code is no longer required. test/lit.cfg is now much shorter and clearer * Removed a lot of duplicate code in lit.local.cfg files that need access to the root configuration, by adding a "root" attribute to the TestingConfig object. This attribute is dynamically computed to provide the same information as was previously provided by the custom getRoot functions. * Documented the config.root attribute in docs/CommandGuide/lit.pod git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.NAKAMURA Takumi2012-03-192-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153038 91177308-0d34-0410-b5e6-96231b3b80d8
* Do the right thing on NULL uint64 fields.Eric Christopher2012-03-161-0/+6
| | | | | | | | Patch by Clemens Hammacher! Fixes PR12243 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152880 91177308-0d34-0410-b5e6-96231b3b80d8
* For types with a parent of the compile unit make sure and emitEric Christopher2012-03-154-7/+33
| | | | | | | | the DECL information. rdar://10855921 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152876 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the removal of DW_AT_MIPS_linkage_name when we aren't puttingEric Christopher2012-03-154-61/+6
| | | | | | | | | out the DW_AT_name. Older gdbs unfortunately still use it to disambiguate member functions in templated classes (gdb.cp/templates.exp). rdar://11043421 (which is now deferred for a bit) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152782 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the DW_AT_MIPS_linkage name attribute when we don't need itEric Christopher2012-03-144-6/+61
| | | | | | | | | | | output (we're emitting a specification already and the information isn't changing). Saves 1% on the debug information for a build of llvm. Fixes rdar://11043421 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152697 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the DW_AT_APPLE_runtime_class attribute to forward declarationsEric Christopher2012-03-071-0/+27
| | | | | | | | as well as completely defined classes. This fixes rdar://10956070 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152171 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reorder the sections being output to reduce the number of assembler"Eric Christopher2012-03-021-8/+8
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151864 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder the sections being output to reduce the number of assemblerEric Christopher2012-03-011-8/+8
| | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151852 91177308-0d34-0410-b5e6-96231b3b80d8
* If the Address of a variable is an argument then treat the entireEric Christopher2012-02-241-0/+127
| | | | | | | | | | | variable declaration as an argument because we want that address anyhow for our debug information. This seems to fix rdar://9965111, at least we have more debug information than before and from reading the assembly it appears to be the correct location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151335 91177308-0d34-0410-b5e6-96231b3b80d8
* Only add DW_AT_prototyped if we're working with a C-like language.Eric Christopher2012-02-223-6/+6
| | | | | | | | Worth another 45k (1%) off of a large C++ testcase. rdar://10909458 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151144 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for previous commit.Eric Christopher2012-02-211-0/+45
| | | | | | rdar://10493979 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151098 91177308-0d34-0410-b5e6-96231b3b80d8
* There's no need for a DW_AT_byte_size on a pointer type.Eric Christopher2012-02-213-5/+5
| | | | | | Part of rdar://10493979 where it reduces by about .5% (10k) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151097 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-164-8/+13
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the testcases for the previous patch.Eric Christopher2012-01-244-9/+7
| | | | | | rdar://10278198 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148795 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't avoid recursing for pointer types, just reference types. Expand onEric Christopher2012-01-111-0/+25
| | | | | | | | the comment. Fixes constvars.exp on the gdb test builder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147897 91177308-0d34-0410-b5e6-96231b3b80d8
* When recursing for the original size of a type, stop if we are at aEric Christopher2011-12-161-0/+172
| | | | | | | | | pointer or a reference type - we actually just want the size of the pointer then for that. Fixes rdar://10335756 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146785 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-271-2/+2
| | | | | | instead of 'volatile load', which is archaic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145171 91177308-0d34-0410-b5e6-96231b3b80d8
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-16/+0
| | | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145169 91177308-0d34-0410-b5e6-96231b3b80d8
* The dwarf standard says that the only differences between a out-of-lineRafael Espindola2011-11-121-0/+97
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144441 91177308-0d34-0410-b5e6-96231b3b80d8
* Move X86 specific test in X86 directory.Devang Patel2011-11-111-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144395 91177308-0d34-0410-b5e6-96231b3b80d8
* Move X86 specific test in X86 directory.Devang Patel2011-11-111-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144394 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in getOrCreateSubprogramDIE if a declaration exists and if so outputRafael Espindola2011-11-101-0/+43
| | | | | | | | it first. This is a more general fix to pr11300. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144324 91177308-0d34-0410-b5e6-96231b3b80d8
* Add triple to test.Rafael Espindola2011-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143735 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit declarations before definitions if they are available. This causes ↵Rafael Espindola2011-11-041-0/+65
| | | | | | | | DW_AT_specification to point back in the file in the included testcase. Fixes PR11300. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143726 91177308-0d34-0410-b5e6-96231b3b80d8
* Move another test requiring x86 into X86 directory.Eli Friedman2011-11-011-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143421 91177308-0d34-0410-b5e6-96231b3b80d8
* Move test requiring x86 backend into X86 directory.Eli Friedman2011-11-011-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143420 91177308-0d34-0410-b5e6-96231b3b80d8
* Always use the string pool, even when it makes the .o larger. This may helpNick Lewycky2011-10-282-32/+22
| | | | | | | | tools that read the debug info in the .o files by making the DIE sizes more consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143186 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach our Dwarf emission to use the string pool.Nick Lewycky2011-10-272-10/+64
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143097 91177308-0d34-0410-b5e6-96231b3b80d8