about summary refs log tree commit diff
path: root/src/test/debuginfo
AgeCommit message (Collapse)AuthorLines
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
2017-10-06Implement display_hint in gdb pretty printersTom Tromey-0/+4
A few pretty-printers were returning a quoted string from their to_string method. It's preferable in gdb to return a lazy string and to let gdb handle the display by having a "display_hint" method that returns "string" -- it lets gdb settings (like "set print ...") work, it handles corrupted strings a bit better, and it passes the information along to IDEs.
2017-09-16change #![feature(const_fn)] to specific gatesAlex Burka-1/+1
2017-06-09Pretty-printers tests: gdbr -> gdbgentoo90-4/+4
2017-06-02Add GDB pretty-printer for OsStringgentoo90-2/+10
2017-06-01Add test for 'invalid literal for int()' exception in gdb pretty-printersgentoo90-0/+5
2017-05-27Stabilize unions with `Copy` fields and no destructorVadim Petrochenkov-1/+0
2017-05-19debuginfo: Generate unique DW_AT_names for compilation units to work around ↵Michael Woerister-0/+67
OSX linker bug.
2017-03-09update gdbr testsTim Neumann-17/+22
gdb will now reliably detect the lanugage as rust even before any code is run.
2017-03-03work around LLVM PR#32123Ariel Ben-Yehuda-1/+2
2017-02-08Exclude top-level macro expansions from source location override.Vadim Chugunov-0/+43
2017-02-04ignore more gdb versions with buggy rust supportTim Neumann-10/+10
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-6/+6
2017-01-13debuginfo: Ignore optimized enum tests for GDB versions that can't handle them.Michael Woerister-0/+10
2017-01-03Auto merge of #38473 - zackmdavis:issue_kebab, r=sanxiynbors-0/+0
prefer hyphens in test files named after issue numbers We have a lot of tests with filenames honoring particular issues by number. Typically, these are called issue-${issue_no}.rs (note the hyphen): ``` $ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc 1289 1289 35935 ``` We also had a much smaller number of files that are like this, but don't have a hyphen in between the substring `issue` and the number: ``` $ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs' ./debuginfo/issue14411.rs ./debuginfo/issue12886.rs ./debuginfo/issue13213.rs ./debuginfo/issue22656.rs ./debuginfo/issue7712.rs ./compile-fail/issue32829.rs ./run-pass/issue24353.rs ./run-pass/issue34796.rs ./run-pass/issue18173.rs ./run-pass/issue22346.rs ./run-pass/auxiliary/issue13507.rs ./run-pass/issue26127.rs ./run-pass/issue22008.rs ./run-pass/issue34569.rs ./run-pass/issue29927.rs ./run-pass/issue36260.rs ``` Some would argue that the inconsistency is æsthetically displeasing, hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of there being two different compile-fail tests with different name conventions for issue no. 32829 is also neglected here for the sake of keeping this trivial cleanup patch as trivial as possible for ease of review.)
2017-01-02Auto merge of #38543 - philipc:unsized-debuginfo, r=michaelwoeristerbors-0/+45
Fix debuginfo for unsized struct members The member was given the size of a fat pointer, which caused llvm to emit DWARF attributes for a 128-bit bitfield.
2017-01-01Add pretty printing of unions in debuggersPhilip Craig-3/+2
Fixes #37479
2016-12-26travis: Update the OSX image we run tests inAlex Crichton-0/+1
The current image is `xcode7.3`, Travis's current default. Unfortunately this has a version of LLDB which doesn't support debuginfo-lldb tests (see #32520), so we're not running LLDB tests on Travis yet. This switches us to the newest image from Travis, `xcode8.2`, which should have a newer version of LLDB we can run tests against.
2016-12-22Fix debuginfo for unsized struct membersPhilip Craig-0/+45
The member was given the size of a fat pointer, which caused llvm to emit DWARF attributes for a 128-bit bitfield.
2016-12-19prefer hyphens in test files named after issue numbersZack M. Davis-0/+0
We have a lot of tests with filenames honoring particular issues by number. Typically, these are called issue-${issue_no}.rs (note the hyphen): ``` $ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc 1289 1289 35935 ``` We also had a much smaller number of files that are like this, but don't have a hyphen in between the substring `issue` and the number: ``` $ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs' ./debuginfo/issue14411.rs ./debuginfo/issue12886.rs ./debuginfo/issue13213.rs ./debuginfo/issue22656.rs ./debuginfo/issue7712.rs ./compile-fail/issue32829.rs ./run-pass/issue24353.rs ./run-pass/issue34796.rs ./run-pass/issue18173.rs ./run-pass/issue22346.rs ./run-pass/auxiliary/issue13507.rs ./run-pass/issue26127.rs ./run-pass/issue22008.rs ./run-pass/issue34569.rs ./run-pass/issue29927.rs ./run-pass/issue36260.rs ``` Some would argue that the inconsistency is æsthetically displeasing, hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of there being two different compile-fail tests with different name conventions for issue #32829 is also neglected here for the sake of keeping this trivial cleanup patch as trivial as possible for ease of review.)
2016-12-14Fix computation of enum names based off the discrfield in the case of the ↵Austin Hicks-2/+2
null pointer optimization. This functionality is needed by pretty printers for gdb and lldb.
2016-12-14Modify debuginfo to deal with the difference between source and memory orderAustin Hicks-17/+17
Fix gdb enum tests to ignore garbage variants, as we no longer actually know what the garbage is.
2016-11-30debuginfo: Ignore macro-stepping test on aarch64Michael Woerister-0/+1
2016-11-11Move all Linux/OSX CI infastructure to TravisAlex Crichton-5/+5
This commit configures our `.travis.yml` to test the full suite of tests we have on Buildbot right now. A whole mess of docker images are added to the `src/ci` directory which represent all the build environments for each configuration. Each of these environments is then configured in `.travis.yml` to run on the auto branch. Note that the full matrix of tests aren't intended to be run on all PRs. Instead, we continue to run only one entry in the matrix, forcing all others to finish quickly. Only the `auto` branch should run the full matrix of builds. Also note that the infrastructure hasn't quite been allocated yet to the rust-lang/rust repository, so everything is disabled for now except for the one build that happens on PRs. Once that infrastructure is allocated though we can enable this and let it fly! Notable modifications from the current test suite today: * Android tests are run in rustbuild instead of the makefiles, for whatever reason I couldn't get the makefiles to work on Travis. * A debuginfo test was updated to work with the current version of the Android NDK. * Some dependencies in `mk/tests.mk` were fixed to allow running tests in parallel.
2016-11-05Merge branch 'gdb-next-gen' of https://github.com/TimNN/rust into rollupAlex Crichton-494/+983
2016-10-31Changed most vec! invocations to use square bracesiirelu-1/+1
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-31adapt debuginfo tests for gdb with native rust supportTim Neumann-494/+983
2016-10-20Fix line stepping in debugger.Vadim Chugunov-0/+91
Attribute drop code to block's closing brace, instead of the line where the allocation was done. Attribute function epilogues to function body's closing brace, rather than the function header.
2016-09-09Add s390x supportUlrich Weigand-0/+5
This adds support for building the Rust compiler and standard library for s390x-linux, allowing a full cross-bootstrap sequence to complete. This includes: - Makefile/configure changes to allow native s390x builds - Full Rust compiler support for the s390x C ABI (only the non-vector ABI is supported at this point) - Port of the standard library to s390x - Update the liblibc submodule to a version including s390x support - Testsuite fixes to allow clean "make check" on s390x Caveats: - Resets base cpu to "z10" to bring support in sync with the default behaviour of other compilers on the platforms. (Usually, upstream supports all older processors; a distribution build may then chose to require a more recent base version.) (Also, using zEC12 causes failures in the valgrind tests since valgrind doesn't fully support this CPU yet.) - z13 vector ABI is not yet supported. To ensure compatible code generation, the -vector feature is passed to LLVM. Note that this means that even when compiling for z13, no vector instructions will be used. In the future, support for the vector ABI should be added (this will require common code support for different ABIs that need different data_layout strings on the same platform). - Two test cases are (temporarily) ignored on s390x to allow passing the test suite. The underlying issues still need to be fixed: * debuginfo/simd.rs fails because of incorrect debug information. This seems to be a LLVM bug (also seen with C code). * run-pass/union/union-basic.rs simply seems to be incorrect for all big-endian platforms. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>