about summary refs log tree commit diff
path: root/src/test/debuginfo
AgeCommit message (Collapse)AuthorLines
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-6/+0
2019-04-22Remove double trailing newlinesvarkor-2/+0
2019-03-30Rollup merge of #59380 - philipc:thinlto-variant, r=michaelwoeristerMazdak Farrokhzad-0/+48
Fix invalid DWARF for enums when using ThinLTO We were setting the same identifier for both the DW_TAG_structure_type and the DW_TAG_variant_part. This becomes a problem when using ThinLTO becauses it uses the identifier as a key for a map of types that is used to delete duplicates based on the ODR, so one of them is deleted as a duplicate, resulting in invalid DWARF. The DW_TAG_variant_part isn't a standalone type, so it doesn't need an identifier. Fix by omitting its identifier. ODR uniquing is [enabled here](https://github.com/rust-lang/rust/blob/f21dee2c6179276321a88a63300dce74ff707e92/src/rustllvm/PassWrapper.cpp#L1101).
2019-03-27Give variant parts their own unique idPhilip Craig-1/+1
and bump llvm version in test
2019-03-23Fix invalid DWARF for enums when using thinltoPhilip Craig-0/+48
We were setting the same identifier for both the DW_TAG_structure_type and the DW_TAG_variant_part. This becomes a problem when using thinlto becauses it uses the identifier as a key for a map of types that is used to delete duplicates based on the ODR, so one of them is deleted as a duplicate, resulting in invalid DWARF. The DW_TAG_variant_part isn't a standalone type, so it doesn't need an identifier. Fix by omitting its identifier.
2019-03-22Correct minimum system LLVM version in testsSamuel Holland-8/+8
Since commit 9452a8dfa3ba, the new debug info format is only generated for LLVM 8 and newer versions. However, the tests still assume that LLVM 7 will use the new debug info format. Fix the tests (and a comment in the code) to match the actual version check.
2019-03-14Moved issue tests to subdirs and normalised names.Alexander Regueiro-3/+3
2019-03-09Rollup merge of #58629 - euclio:debug-empty-str, r=alexcrichtonMazdak Farrokhzad-0/+35
rust-lldb: fix crash when printing empty string Fixes #52185. ~Re-enables the pretty-std debuginfo test and tweaks the test as necessary to get it to pass again. This reveals that lldb's formatting of enums is broken (#58492). I also removed the emoji from the test because I couldn't get the docker image's gdb to print the emoji, just octal escapes (https://github.com/rust-lang/rust/pull/53154/files#r208263904).~
2019-03-06rust-lldb: fix crash when printing empty stringAndy Russell-0/+35
2019-02-23Add debug-info to access variables from generator stateWim Looman-2/+8
2019-01-27Update generator upvar debug infoWim Looman-0/+36
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2018-12-25Remove licensesMark Rousskov-1238/+3
2018-12-20Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, ↵bors-55/+0
r=nikomatsakis Less conservative uninhabitedness check Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays. Pulled out of #47291 and #50262. Fixes https://github.com/rust-lang/rust/issues/54586. r? @nikomatsakis
2018-12-20Remove nil-enum testvarkor-24/+0
2018-12-14Rollup merge of #56756 - tromey:Bug-56730-btree-pretty-printer, r=alexcrichtonkennytm-1/+5
Disable btree pretty-printers on older gdbs gdb versions before 8.1 have a bug that prevents the BTreeSet and BTreeMap pretty-printers from working. This patch disables the test on those versions, and also disables the pretty-printers there as well. Closes #56730
2018-12-12Disable btree pretty-printers on older gdbsTom Tromey-1/+5
gdb versions before 8.1 have a bug that prevents the BTreeSet and BTreeMap pretty-printers from working. This patch disables the test on those versions, and also disables the pretty-printers there as well. Closes #56730
2018-12-11Auto merge of #53497 - fukatani:test-debuginfo-function-call, r=tromeybors-0/+52
Test with gdb8.2 and add debuginfo printing function call test As far as I can see, `print function()` is not tested. It is important feature for debugging.
2018-12-11Add function call test, Update gdb and test docker image install gdb by ppa.Unknown-0/+52
2018-12-11Check for uninhabitedness instead of nevervarkor-39/+8
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-29Add template parameter debuginfo to generic typesTom Tromey-6/+16
This changes debuginfo generation to add template parameters to generic types. With this change the DWARF now has DW_TAG_template_type_param for types, not just for functions, like: <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type) <40e> DW_AT_name : (indirect string, offset: 0x375): Generic<i32> <412> DW_AT_byte_size : 4 <413> DW_AT_alignment : 4 ... <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param) <420> DW_AT_type : <0x42a> <424> DW_AT_name : (indirect string, offset: 0xa65e): T Closes #9224
2018-11-25Rollup merge of #56144 - tromey:Bug-55771-btreemap, r=alexcrichtonPietro Albini-8/+9
Fix BTreeSet and BTreeMap gdb pretty-printers The BTreeSet and BTreeMap gdb pretty-printers did not take the node structure into account, and consequently only worked for shallow sets. This fixes the problem by iterating over child nodes when needed. This patch avoids the current approach of implementing some of the value manipulations in debugger-indepdendent code. This was done for convenience: a type lookup was needed for the first time, and there currently are no lldb formatters for these types. Closes #55771
2018-11-24Rollup merge of #55767 - tromey:disable-some-pretty-printers, r=alexcrichtonkennytm-9/+9
Disable some pretty-printers when gdb is rust-enabled A rust-enabled gdb already knows how to display string slices, structs, tuples, and enums (and after #54004, the pretty-printers can't handle enums at all). This patch disables these pretty-printers when gdb is rust-enabled. The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed, because it does not seem to depend on any behavior of that version of gdb, and because gdb 7.7 is 4 years old now.
2018-11-21Fix BTreeSet and BTreeMap gdb pretty-printersTom Tromey-8/+9
The BTreeSet and BTreeMap gdb pretty-printers did not take the node structure into account, and consequently only worked for shallow sets. This fixes the problem by iterating over child nodes when needed. This patch avoids the current approach of implementing some of the value manipulations in debugger-indepdendent code. This was done for convenience: a type lookup was needed for the first time, and there currently are no lldb formatters for these types. Closes #55771
2018-11-19Disable some pretty-printers when gdb is rust-enabledTom Tromey-9/+9
A rust-enabled gdb already knows how to display string slices, structs, tuples, and enums (and after #54004, the pretty-printers can't handle enums at all). This patch disables these pretty-printers when gdb is rust-enabled. The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed, because it does not seem to depend on any behavior of that version of gdb, and because gdb 7.7 is 4 years old now.
2018-11-14Fix VecDeque pretty-printerTom Tromey-0/+11
This fixes the VecDeque pretty-printer to handle cases where head < tail. Closes #55944
2018-11-06Update lldbTom Tromey-1/+1
This updates lldb to pick up some bug fixes, and makes one minor test suite fix to account for this.
2018-10-30Add legacy debuginfo testsTom Tromey-0/+996
The enum debuginfo patch includes a legacy mode that is used when building against LLVM 5 and LLVM 6. The main enum debuginfo tests have been updated to rely on the new approach and a new-enough gdb. This patch makes a copy of these tests so that the fallback mode will continue to be tested. Note that nil-enum.rs is not copied; it seemed not to provide enough value to bother. A new header directive is added, "ignore-llvm-version". I will send a patch to update the rustc documentation once this lands.
2018-10-30Update enum debuginfo testsTom Tromey-111/+95
Bug #52452 notes some debuginfo test regressions when moving to gdb 8.1. This series will also cause versions of gdb before 8.2 to fail when a recent LLVM is used -- DW_TAG_variant_part support was not added until 8.2. This patch updates one of the builders to a later version of Ubuntu, which comes with gdb 8.2. It updates the relevant tests to require both a new-enough LLVM and a new-enough gdb; the subsequent patch arranges to continue testing the fallback mode. The "gdbg" results are removed from these tests because the tests now require a rust-enabled gdb. If you read closely, you'll see that some of the lldb results in this patch still look a bit strange. This will be addressed in a subsequent patch; I believe the fix is to disable the Python pretty-printers when lldb is rust-enabled.
2018-10-10Run both lldb and gdb testsTom Tromey-1/+1
Currently lldb tests are run only on macOS, and gdb tests are only run elsewhere. This patch changes this to run tests depending on what is available. One test is changed, as it was previously marked as failing on macOS, whereas really it is a generic failure with lldb. Closes #54721
2018-10-10Auto merge of #54764 - tromey:test-rust-lldb, r=alexcrichtonbors-672/+1334
Run debuginfo tests against rust-enabled lldb, when possible If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2018-10-08Run debuginfo tests against rust-enabled lldb, when possibleTom Tromey-672/+1334
If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2018-09-30make the nil-enum test work againJorge Aparicio-2/+7
2018-09-29Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"Ralf Jung-7/+2
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
2018-09-22make the nil-enum test work againJorge Aparicio-2/+7
2018-08-15pretty printing for btreemapUnknown-1/+11
2018-08-14Rollup merge of #53112 - fukatani:pretty-print-btreeset, r=michaelwoeristerkennytm-0/+50
pretty print BTreeSet I want pretty printing for BTreeSet. ```rust use std::collections::*; fn main() { let mut s = BTreeSet::new(); s.insert(5); s.insert(3); s.insert(7); s.remove(&3); println!("{:?}", s); } ``` ``` (gdb) b 9 (gdb) p s $1 = BTreeSet<i32> with 2 elements = {[0] = 5, [1] = 7} ``` This is analogy of pretty printing for C++ std::set.
2018-08-13fix behaviorUnknown-1/+1
2018-08-07add gdb test for std::collectionsfukatani-0/+50
2018-08-05Fix test/debuginfovarkor-1/+0
2018-07-18Remove workarounds for #24958ljedrz-3/+0
2018-05-17Rename trans to codegen everywhere.Irina Popa-2/+2
2018-04-26Mark SingleVariant as repr(u8) in c-style-enumAnthony Ramine-0/+1
I should rather properly fix debuginfo but I have no clue how to do that.
2018-03-07travis: Upgrade OSX buildersAlex Crichton-0/+1
This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as opposed to the 2 that our builders currently have. Should help make those OSX builds a bit speedier!
2018-01-06Debuginfo Shadowed Variable test: fix check numberingSam-9/+8
2018-01-05Disable failing tests temporarilySam-2/+25
2018-01-03Restore working debuginfo tests by trimming comments from non-header ↵Sam-0/+38
directive lines
2017-12-21fix debuginfo scoping of let-statementsAriel Ben-Yehuda-0/+32
2017-11-26Stabilize const-calling existing const-fns in stdSimon Sapin-1/+0
Fixes #46038