about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2021-03-17Update HashSet natvisMarkus Westerlind-7/+7
2021-03-16feat: Update hashbrown to instantiate less llvm IRMarkus Westerlind-13/+14
Includes https://github.com/rust-lang/hashbrown/pull/204 and https://github.com/rust-lang/hashbrown/pull/205 (not yet merged) which both server to reduce the amount of IR generated for hashmaps. Inspired by the llvm-lines data gathered in https://github.com/rust-lang/rust/pull/76680
2021-03-08Rollup merge of #82557 - rylev:natvis-improvements, r=varkorDylan DPC-0/+51
Add natvis for Result, NonNull, CString, CStr, and Cow This adds natvis support (used for Windows debugging) to the following types: `Result`, `NonNull`, `CString`, `CStr`, and `Cow`.
2021-03-01Change twice used large const table to staticDavid Tolnay-1/+1
This table is used twice in core::num::dec2flt::algorithm::power_of_ten. According to the semantics of const, a separate huge definition of the table is inlined at both places. fn power_of_ten(e: i16) -> Fp { assert!(e >= table::MIN_E); let i = e - table::MIN_E; let sig = table::POWERS.0[i as usize]; let exp = table::POWERS.1[i as usize]; Fp { f: sig, e: exp } } Theoretically this gets cleaned up by optimization passes, but in practice I am experiencing a miscompile from LTO on this code. Making the table a static, which would only be defined a single time and not require attention from LTO, eliminates the miscompile and seems semantically more appropriate anyway. A separate bug report on the LTO bug is forthcoming.
2021-03-01Add natvis for Result, NonNull, CString, CStr, and CowRyan Levick-0/+51
2021-02-24fix typo in `pre-commit.sh`katelyn martin-1/+1
2021-02-14Rollup merge of #81891 - CraftSpider:fn-header, r=jyn514Dylan DPC-1/+1
[rustdoc-json] Make `header` a vec of modifiers, and FunctionPointer consistent Bumps version number and adds tests, this is a breaking change. I can split this into two (`is_unsafe` -> `header` and `header: Vec<Modifiers>`) if desired. Rationale: Modifiers are individual notes on a function, it makes more sense for them to be a list of an independent enum over a String which is inconsistently exposing the HIR representation (prefix_str vs custom literals). Function pointers currently only support `unsafe`, but there has been talk on and off about allowing them to also support `const`, and this makes handling their modifiers consistent with handling those of a function, allowing better shared code. `@rustbot` modify labels: +A-rustdoc-json +T-rustdoc CC: `@HeroicKatora` r? `@jyn514`
2021-02-08Make `header` a vec of modifiers, make FunctionPointer consistent with ↵Rune Tynan-1/+1
Function and Method.
2021-02-06Resolve typedef in HashMap lldb pretty-printer only if possibleortem-1/+3
Previously, `GetTypedefedType` was invoked unconditionally. But this did not work in case of `rust-lldb` without Rust patches since there was no typedef actually.
2021-01-19Add jsondocck tool, and use it for rustdoc JSONRune Tynan-0/+189
2021-01-03Detect invalid rustdoc test commandsGuillaume Gomez-1/+11
2020-12-30Rollup merge of #80311 - sivadeilra:natvis, r=petrochenkovYuki Okushi-39/+59
Improvements to NatVis support NatVis files describe how to display types in some Windows debuggers, such as Visual Studio, WinDbg, and VS Code. This commit makes several improvements: * Adds visualizers for Rc<T>, Weak<T>, and Arc<T>. * Changes [size] to [len], for consistency with the Rust API. Visualizers often use [size] to mirror the size() method on C++ STL collections. * Several visualizers used the PVOID and ULONG typedefs. These are part of the Windows API; they are not guaranteed to always be defined in a pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to `unsigned long`. * Cosmetic change: Removed {} braces around the visualized display for `Option` types. They now display simply as `Some(value)` or `None`, which reflects what is written in source code. * The visualizer for `alloc::string::String` makes assumptions about the layout of `String` (it casts `String*` to another type), rather than using symbolic expressions. This commit changes the visualizer so that it simply uses symbolic expressions to access the string data and string length. * The visualizers for `str` and `String` now place the character data array under a synthetic `[chars]` node. When expanding a `String` node, users rarely want to see an array of characters. This just places them behind one expansion node / level.
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-1/+1
2020-12-28Improvements to NatVis supportArlie Davis-39/+59
NatVis files describe how to display types in some Windows debuggers, such as Visual Studio, WinDbg, and VS Code. This commit makes several improvements: * Adds visualizers for Rc<T>, Weak<T>, and Arc<T>. * Changes [size] to [len], for consistency with the Rust API. Visualizers often use [size] to mirror the size() method on C++ STL collections. * Several visualizers used the PVOID and ULONG typedefs. These are part of the Windows API; they are not guaranteed to always be defined in a pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to `unsigned long`. * Cosmetic change: Removed {} braces around the visualized display for `Option` types. They now display simply as `Some(value)` or `None`, which reflects what is written in source code. * The visualizer for `alloc::string::String` makes assumptions about the layout of `String` (it casts `String*` to another type), rather than using symbolic expressions. This commit changes the visualizer so that it simply uses symbolic expressions to access the string data and string length.
2020-12-02Auto merge of #79235 - ortem:fix-btreemap-gdb-pretty-printer, r=Mark-Simulacrumbors-4/+5
Fix zero-sized BTreeMap gdb pretty-printer `gdb.parse_and_eval("()")` is needed because GDB treats "()" as a Rust array of two characters, not as a unit Based on https://github.com/intellij-rust/intellij-rust/pull/6356
2020-11-28Rollup merge of #79234 - ortem:fix-hashmap-pretty-printers, r=Mark-SimulacrumJonas Schievink-2/+2
Resolve typedefs in HashMap gdb/lldb pretty-printers `GetTypedefedType` (LLDB) and `strip_typedefs` (GDB) calls are needed to resolve key and value types completely. Without these calls, debugger doesn't show the actual type. **Before** (without `GetTypedefedType`): ``` (lldb) frame variable hm[0] (T) hm[0] = { ... } ``` **After** (with `GetTypedefedType`): ``` (lldb) frame variable hm[0] ((i32, alloc::string::String)) hm[0] = { ... } ``` Based on https://github.com/intellij-rust/intellij-rust/pull/6258
2020-11-23BTreeMap: cut out the ceremony around BoxedNodeStein Somers-6/+6
2020-11-23Fix zero-sized BTreeMap gdb pretty-printerortem-4/+5
`gdb.parse_and_eval("()")` is needed because GDB treats "()" as a Rust array of two characters, not as a unit
2020-11-20Resolve typedefs in HashMap gdb/lldb pretty-printersortem-2/+2
`GetTypedefedType` (LLDB) and `strip_typedefs` (GDB) calls are needed to resolve key and value types completely. Without these calls, debugger doesn't show the actual type. * Before (without `GetTypedefedType`): (lldb) frame variable hm[0] (T) hm[0] = { ... } * After (with `GetTypedefedType`): (lldb) frame variable hm[0] ((i32, alloc::string::String)) hm[0] = { ... }
2020-11-18BTreeMap: reuse NodeRef as Root, keep BoxedNode for edges only, ban UniqueStein Somers-33/+34
2020-11-03lldb_batchmode: show more error informationPietro Albini-2/+2
Even more information to try and debug #78665.
2020-10-14BTreeMap: improve gdb introspection of BTreeMap with ZST keys or valuesStein Somers-11/+9
2020-10-14Rollup merge of #77788 - ssomers:btree_cleanup_gdb, r=Mark-SimulacrumDylan DPC-31/+32
BTreeMap: fix gdb provider on BTreeMap with ZST keys or values Avoid error when gdb is asked to inspect a BTreeMap or BTreeSet with a zero-sized type as key or value. And clean up. r? @Mark-Simulacrum
2020-10-10BTreeMap: fix gdb introspection of BTreeMap with ZST keys or valuesStein Somers-31/+32
2020-10-09Auto merge of #77609 - ortem:fix-lldb-commands, r=Mark-Simulacrumbors-17/+17
Remove redundant backslashes from `lldb_commands`
2020-10-07Unset GIT_DIR in pre-commit hookJoshua Nelson-4/+6
Works around https://github.com/rust-lang/rust/issues/77620
2020-10-06Remove redundant backslashes from `lldb_commands`ortem-17/+17
2020-10-05Clean up pre-commit.shCassandra Fridkin-5/+4
2020-10-05Move script to src/etcCassandra Fridkin-0/+22
2020-09-08Implement HashSet in terms of hashbrown::HashSetMatt Brubeck-14/+37
2020-09-05Fix HashMap visualizers in Visual Studio (Code)MaulingMonkey-2/+2
CDB doesn't care that you're using static_cast between unrelated types. VS(C) does. These should've been reinterpret_cast or C casts. Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`
2020-08-28Fix loading pretty-printers in rust-lldb scriptortem-2/+4
2020-08-07Handle new HashMap layout in CDB, MSVC, WinDbg, etc.MaulingMonkey-31/+4
2020-08-07Handle new HashMap layout in GDB and LLDBAmanieu d'Antras-4/+18
2020-07-31Run all tests if have no specified testsLzu Tao-3/+5
2020-07-29Avoid bool-like namingLzu Tao-3/+2
2020-07-26python codes cleanupjnozsc-4/+4
2020-07-11Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=AmanieuManish Goregaokar-0/+124
debuginfo: Mangle tuples to be natvis friendly, typedef basic types These changes are meant to unblock rust-lang/rust#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.) * f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>` * 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
2020-07-10Avoid "whitelist"Tamir Duberstein-5/+3
Other terms are more inclusive and precise.
2020-07-03Rollup merge of #73140 - tmiasko:element-tree, r=GuillaumeGomezManish Goregaokar-1/+4
Fallback to xml.etree.ElementTree The xml.etree.cElementTree has been deprecated since Python 3.3 and removed in Python 3.9 https://bugs.python.org/issue36543.
2020-07-01Rollup merge of #72569 - ChrisDenton:remove-innosetup, r=nikomatsakisManish Goregaokar-367/+0
Remove legacy InnoSetup GUI installer On Windows the InnoSetup `.exe` installer was superseded by the MSI installer long ago. It's no longer needed. The `.exe` installer hasn't been linked from the [other installation methods](https://forge.rust-lang.org/infra/other-installation-methods.html#standalone) page in many years. As far as I can tell the intent was always to remove this installer once the MSI proved itself. Though admittedly both installers feel very "legacy" at this point. Removing this would mean we only maintain one Windows GUI installer and would speed up the distribution phase. As a result of removing InnoSetup, this closes #24397
2020-06-24Modify type names on MSVC to make tuples .natvis compatible.MaulingMonkey-0/+124
- 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-1183/+1442
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-06-08Fallback to xml.etree.ElementTreeTomasz Miąsko-1/+4
The xml.etree.cElementTree has been deprecated since Python 3.3 and removed in Python 3.9 https://bugs.python.org/issue36543.
2020-05-25Remove legacy InnoSetup GUI installerChris Denton-367/+0
On Windows the InnoSetup installer was superseded by the MSI installer. It's no longer needed.
2020-04-10Enforce Python 3 as much as possibleGuillaume Gomez-2/+2
2020-04-06Rollup merge of #70713 - jsgf:rust-gdb-rustc, r=Mark-SimulacrumMazdak Farrokhzad-2/+18
Prefer sysroot from rustc in same directory as rust-gdb If there isn't a rustc in the same directory, then fall back to searching the path.
2020-04-05Stop importing int module in float parse testLinus Färnstrand-1/+0
2020-04-02Prefer sysroot from rustc in same directory as rust-gdbJeremy Fitzhardinge-2/+18
If there isn't a rustc in the same directory, then fall back to searching the path.
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-3/+0