about summary refs log tree commit diff
path: root/src/test/debuginfo
AgeCommit message (Collapse)AuthorLines
2020-07-27Suppress debuginfo on naked function argumentsNathaniel McCallum-0/+40
A function that has no prologue cannot be reasonably expected to support debuginfo. In fact, the existing code (before this patch) would generate invalid instructions that caused crashes. We can solve this easily by just not emitting the debuginfo in this case. Fixes https://github.com/rust-lang/rust/issues/42779 cc https://github.com/rust-lang/rust/issues/32408
2020-07-19Add missing : after min-gdb-versionLzu Tao-5/+5
2020-06-24Modify type names on MSVC to make tuples .natvis compatible.MaulingMonkey-0/+109
- Mangles (T0, T1) as tuple<T0, T1>, possibly unblocking rust-lang/rust#70052 "Update hashbrown to 0.8.0" - Prettifies Rust tuples similar to VS2017's std::tuple - Improves debuginfo test coverage
2020-06-09Implement new gdb/lldb pretty-printersortem-302/+392
Replace old GDB and LLDB pretty-printers with new ones which were originally written for IntelliJ Rust. New LLDB pretty-printers support synthetic children. New GDB/LLDB pretty-printers support all Rust types supported by old pretty-printers, and also support: Rc, Arc, Cell, Ref, RefCell, RefMut, HashMap, HashSet.
2020-05-16`ret` has been optimized away in debuginfo testDylan MacKenzie-30/+9
2020-04-14Update the minimum external LLVM to 8Josh Stone-26/+11
LLVM 8 was released on March 20, 2019, over a year ago.
2020-03-26Test and fix gdb pretty printing againStein Somers-4/+15
2020-03-21Test pretty printing more and fix overzealous type substitutionStein Somers-2/+10
2020-03-20Fix debugger pretty printing of BTreesMark Rousskov-7/+17
2020-03-03Update testsYuki Okushi-37/+0
2020-02-16Ignore GDB versions with broken str printing.spunit262-0/+1
https://sourceware.org/bugzilla/show_bug.cgi?id=22236
2020-02-09rustc_codegen_ssa: only "spill" SSA-like values to the stack for debuginfo.Eduard-Mihai Burtescu-1/+1
2020-02-02Add a resume type parameter to `Generator`Jonas Schievink-7/+7
2020-01-07Remove legacy debuginfo testsNikita Popov-916/+0
These are no longer relevant, as our minimum supported version is LLVM 7.
2019-11-20debuginfo: Support for std::collections::Hash* in windows debuggers.MaulingMonkey-0/+97
2019-09-18fix debuginfo/issue22656 with LLDB 8Maximilian Roos-1/+1
2019-09-15use println!()Guanqun Lu-2/+2
2019-08-31Rename test locals to work around LLDB bugJoe Ranweiler-8/+8
LLDB's expression parser can't unambiguously resolve local variables in some cases, as described in #47938. Work around this by using names that don't shadow direct submodules of `core`.
2019-08-27debuginfo: always include disambiguator in type namesPhilip Craig-10/+10
2019-08-25debuginfo: give unique names to closure and generator typesPhilip Craig-0/+55
Closure types have been moved to the namespace where they are defined, and both closure and generator type names now include the disambiguator. This fixes an exception when lldb prints nested closures. Fixes #57822
2019-05-20Fix CDB support tidy check line length failures.MaulingMonkey-3/+3
2019-05-19Add basic CDB support to debuginfo compiletest s, to help catch `*.natvis` ↵MaulingMonkey-2/+59
regressions, like those fixed in #60687. Several Microsoft debuggers (VS, VS Code, WinDbg, CDB, ...) consume the `*.natvis` files we embed into rust `*.pdb` files. While this only tests CDB, that test coverage should help for all of them. CHANGES src\bootstrap - test.rs: Run CDB debuginfo tests on MSVC targets src\test\debuginfo - issue-13213.rs: CDB has trouble with this, skip for now (newly discovered regression?) - pretty-std.rs: Was ignored, re-enable for CDB only to start with, add CDB tests. - should-fail.rs: Add CDB tests. src\tools\compiletest: - Added "-cdb" option - Added Mode::DebugInfoCdb ("debuginfo-cdb") - Added run_debuginfo_cdb_test[_no_opt] - Renamed Mode::DebugInfoBoth -> DebugInfoGdbLldb ("debuginfo-gdb+lldb") since it's no longer clear what "Both" means. - Find CDB at the default Win10 SDK install path "C:\Program Files (x86)\Windows Kits\10\Debugger\*\cdb.exe" - Ignore CDB tests if CDB not found. ISSUES - `compute_stamp_hash`: not sure if there's any point in hashing `%ProgramFiles(x86)%` - `OsString` lacks any `*.natvis` entries (would be nice to add in a followup changelist) - DSTs (array/string slices) which work in VS & VS Code fail in CDB. - I've avoided `Mode::DebugInfoAll` as 3 debuggers leads to pow(2,3)=8 possible combinations. REFERENCE CDB is not part of the base Visual Studio install, but can be added via the Windows 10 SDK: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk Installing just "Debugging Tools for Windows" is sufficient. CDB appears to already be installed on appveyor CI, where this changelist can find it, based on it's use here: https://github.com/rust-lang/rust/blob/0ffc57311030a1930edfa721fe57d0000a063af4/appveyor.yml#L227 CDB commands and command line reference: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-reference
2019-05-03Address review commentsTyler Mandry-4/+4
2019-04-25Include generator locals as field names in debuginfoTyler Mandry-4/+4
2019-04-25Make generator object debuginfo easier to readTyler Mandry-4/+4
2019-04-25Describe generator variants in debuginfoTyler Mandry-0/+68
2019-04-25Test debuginfo of different var liveness in generatorsTyler Mandry-4/+49
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