1734 Commits

Author SHA1 Message Date
bors
92e4fb0732 Auto merge of #79235 - ortem:fix-btreemap-gdb-pretty-printer, r=Mark-Simulacrum
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-12-02 04:12:33 +00:00
Jonas Schievink
93d830ed50
Rollup merge of #79234 - ortem:fix-hashmap-pretty-printers, r=Mark-Simulacrum
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-28 15:58:17 +01:00
Stein Somers
8526c313c1 BTreeMap: cut out the ceremony around BoxedNode 2020-11-23 17:02:08 +01:00
ortem
685e1f3e45 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
2020-11-23 17:07:14 +03:00
ortem
905ed3bb6b 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] = { ... }
2020-11-20 17:54:57 +03:00
Stein Somers
9fca57ceb9 BTreeMap: reuse NodeRef as Root, keep BoxedNode for edges only, ban Unique 2020-11-18 10:07:42 +01:00
Pietro Albini
c32de757cd
lldb_batchmode: show more error information
Even more information to try and debug #78665.
2020-11-03 12:01:46 +01:00
Stein Somers
28af355b9f BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values 2020-10-14 13:03:23 +02:00
Dylan DPC
9c365a2561
Rollup merge of #77788 - ssomers:btree_cleanup_gdb, r=Mark-Simulacrum
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-14 02:30:36 +02:00
Stein Somers
bb9da7a0ed BTreeMap: fix gdb introspection of BTreeMap with ZST keys or values 2020-10-10 15:27:51 +02:00
bors
be719d11e5 Auto merge of #77609 - ortem:fix-lldb-commands, r=Mark-Simulacrum
Remove redundant backslashes from `lldb_commands`
2020-10-09 15:18:41 +00:00
Joshua Nelson
f4989494bf Unset GIT_DIR in pre-commit hook
Works around https://github.com/rust-lang/rust/issues/77620
2020-10-07 19:50:27 -04:00
ortem
4f792d6b88 Remove redundant backslashes from lldb_commands 2020-10-06 11:57:51 +03:00
Cassandra Fridkin
68ca4742c5
Clean up pre-commit.sh 2020-10-05 19:35:06 -04:00
Cassandra Fridkin
7de557bf9c
Move script to src/etc 2020-10-05 18:57:48 -04:00
Matt Brubeck
ebd15e790a Implement HashSet in terms of hashbrown::HashSet 2020-09-08 17:24:23 -07:00
MaulingMonkey
5acd272f5f Fix HashMap visualizers in Visual Studio (Code)
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-09-05 14:50:03 -07:00
ortem
9cdcfe2288 Fix loading pretty-printers in rust-lldb script 2020-08-28 09:29:45 +03:00
MaulingMonkey
122c03745e Handle new HashMap layout in CDB, MSVC, WinDbg, etc. 2020-08-07 07:03:15 +01:00
Amanieu d'Antras
e3283e0331 Handle new HashMap layout in GDB and LLDB 2020-08-07 07:03:15 +01:00
Lzu Tao
a4757225d7 Run all tests if have no specified tests 2020-07-31 04:20:27 +00:00
Lzu Tao
0374006d79 Avoid bool-like naming 2020-07-29 10:48:00 +00:00
jnozsc
db4e9722bf python codes cleanup 2020-07-26 09:56:12 -07:00
Manish Goregaokar
084ac77cf2
Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=Amanieu
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-11 08:53:13 -07:00
Tamir Duberstein
62cf767a4a
Avoid "whitelist"
Other terms are more inclusive and precise.
2020-07-10 07:39:28 -04:00
Manish Goregaokar
df8f551e79
Rollup merge of #73140 - tmiasko:element-tree, r=GuillaumeGomez
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-03 17:16:50 -07:00
Manish Goregaokar
fb976e65a0
Rollup merge of #72569 - ChrisDenton:remove-innosetup, r=nikomatsakis
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-07-01 20:35:41 -07:00
MaulingMonkey
f8eb81ba4e Modify type names on MSVC to make tuples .natvis compatible.
- 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-24 19:28:12 -07:00
ortem
47c26e69a9 Implement new gdb/lldb pretty-printers
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-09 16:13:11 +03:00
Tomasz Miąsko
291dce91b2 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-06-08 20:35:56 +02:00
Chris Denton
912963bd08 Remove legacy InnoSetup GUI installer
On Windows the InnoSetup installer was superseded by the MSI installer. It's no longer needed.
2020-05-25 13:53:02 +01:00
Guillaume Gomez
38eb369fa4 Enforce Python 3 as much as possible 2020-04-10 09:09:58 -04:00
Mazdak Farrokhzad
4911d168d8
Rollup merge of #70713 - jsgf:rust-gdb-rustc, r=Mark-Simulacrum
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-06 04:24:18 +02:00
Linus Färnstrand
d0fc5d9e6b Stop importing int module in float parse test 2020-04-05 11:22:01 +02:00
Jeremy Fitzhardinge
7a824c8598 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-02 11:52:35 -07:00
Eduard-Mihai Burtescu
8deff18529 tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
bors
697d6b3f3f Auto merge of #70282 - ssomers:btreemap_gdb_pretty_print, r=Mark-Simulacrum
Test and fix gdb pretty printing more

Over time I had oversimplified the test case for #68098: it does not have an internal node to print so it did not test what it pretended to test. And then I also realized not spotting the same mistake reviewing #70111, and more likely to occur in the wild. Now, both test cases fail if you put back the flawed python code.

r? @Mark-Simulacrum
2020-03-27 09:54:02 +00:00
Stein Somers
3d435d8023 Test and fix gdb pretty printing again 2020-03-26 23:09:20 +00:00
Thomas Bächler
a9484d4647 Make x.py compatible with python 3.8.
Python 3.8 removes the time.clock() function, use time.perf_counter() instead.
2020-03-25 16:11:46 +01:00
Stein Somers
d8a136fa10 Test pretty printing more and fix overzealous type substitution 2020-03-21 14:03:09 +00:00
Mark Rousskov
bce7f6f3a0 Fix debugger pretty printing of BTrees 2020-03-20 12:02:07 -04:00
Dylan DPC
53a790c58a
Rollup merge of #69049 - pthariensflame:improvement/imgbot, r=GuillaumeGomez
Optimize image sizes

This was done by [ImgBot](https://imgbot.net/) on my own fork, which I then immediately merged and turned into this manual pull request. Below is reproduced [ImgBot's own message](https://github.com/pthariensflame/rust/pull/3#issue-373452394) on the content of this PR.

r? @steveklabnik since this is a documentation PR, I guess.

---

> ## Beep boop. Your images are optimized!
>
> Your image file size has been reduced by **21%** 🎉
>
> <details>
> <summary>
> Details
> </summary>
>
> | File | Before | After | Percent reduction |
> |:--|:--|:--|:--|
> | /src/etc/installer/gfx/rust-logo.png | 5.71kb | 3.82kb | 33.11% |
> | /src/librustdoc/html/static/down-arrow.svg | 0.63kb | 0.50kb | 20.44% |
> | /src/librustdoc/html/static/wheel.svg | 3.86kb | 3.68kb | 4.66% |
> | /src/librustdoc/html/static/brush.svg | 0.47kb | 0.44kb | 4.61% |
> | | | | |
> | **Total :** | **10.65kb** | **8.44kb** | **20.82%** |
> </details>
>
> ---
>
> [📝docs](https://imgbot.net/docs) | [:octocat: repo](https://github.com/dabutvin/ImgBot) | [🙋issues](https://github.com/dabutvin/ImgBot/issues) | [🏅swag](https://goo.gl/forms/1GX7wlhGEX8nkhGO2) | [🏪marketplace](https://github.com/marketplace/imgbot)
2020-02-13 02:52:53 +01:00
ImgBotApp
c18476e231
[ImgBot] Optimize images
*Total -- 10.65kb -> 8.44kb (20.82%)

/src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%)
/src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%)
/src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%)
/src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-02-11 03:01:20 +00:00
Chris Simpkins
77d158d401 shorten comment blocks to < 100 characters 2020-02-08 08:13:01 -05:00
Chris Simpkins
9b10fc4205 remove unnecessary import statement, PEP8 format spacing 2020-02-08 00:38:20 -05:00
Chris Simpkins
814aa0667b PEP8 format spacing 2020-02-08 00:31:12 -05:00
Chris Simpkins
85e3661214 PEP8 format spacing, remove unnecessary local variable assignment 2020-02-08 00:12:25 -05:00
Chris Simpkins
8d04b95188 remove unnecessary import statement 2020-02-08 00:03:51 -05:00
Chris Simpkins
a53f45fe90 PEP8 format spacing, split import statements 2020-02-08 00:02:11 -05:00
Chris Simpkins
d36634315a PEP8 format spacing 2020-02-08 00:01:32 -05:00