Skip to content

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Oct 10, 2020

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

📌 Commit bb9da7a has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#77765 (Add LLVM flags to limit DWARF version to 2 on BSD)
 - rust-lang#77788 (BTreeMap: fix gdb provider on BTreeMap with ZST keys or values)
 - rust-lang#77795 (Codegen backend interface refactor)
 - rust-lang#77808 (Moved the main `impl` for FnCtxt to its own file.)
 - rust-lang#77817 (Switch rustdoc from `clean::Stability` to `rustc_attr::Stability`)
 - rust-lang#77829 (bootstrap: only use compiler-builtins-c if they exist)
 - rust-lang#77870 (Use intra-doc links for links to module-level docs)
 - rust-lang#77897 (Move `Strip` into a separate rustdoc pass)

Failed merges:

 - rust-lang#77879 (Provide better documentation and help messages for x.py setup)
 - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests)

r? `@ghost`
@bors bors merged commit 9c365a2 into rust-lang:master Oct 14, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 14, 2020
@ssomers ssomers deleted the btree_cleanup_gdb branch October 14, 2020 08:38
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 16, 2020
…imulacrum

BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values

I accidentally pushed an earlier revision in rust-lang#77788: it changes the index of tuples for BTreeSet from ""[{}]".format(i) to "key{}".format(i). Which doesn't seem to make the slightest difference on my linux box nor on CI. In fact, gdb doesn't make any distinction between "key{}" and "val{}" for a BTreeMap either, leading to confusing output if you test more. But easy to improve.

r? @Mark-Simulacrum
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 17, 2020
…imulacrum

BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values

I accidentally pushed an earlier revision in rust-lang#77788: it changes the index of tuples for BTreeSet from ""[{}]".format(i) to "key{}".format(i). Which doesn't seem to make the slightest difference on my linux box nor on CI. In fact, gdb doesn't make any distinction between "key{}" and "val{}" for a BTreeMap either, leading to confusing output if you test more. But easy to improve.

r? @Mark-Simulacrum
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 17, 2020
…imulacrum

BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values

I accidentally pushed an earlier revision in rust-lang#77788: it changes the index of tuples for BTreeSet from ""[{}]".format(i) to "key{}".format(i). Which doesn't seem to make the slightest difference on my linux box nor on CI. In fact, gdb doesn't make any distinction between "key{}" and "val{}" for a BTreeMap either, leading to confusing output if you test more. But easy to improve.

r? @Mark-Simulacrum
artemmukhin added a commit to intellij-rust/intellij-rust that referenced this pull request Nov 5, 2020
* Fixes #5722
* Do not fail on zero-sized keys or values rust-lang/rust#77788
artemmukhin added a commit to intellij-rust/intellij-rust that referenced this pull request Nov 5, 2020
artemmukhin added a commit to intellij-rust/intellij-rust that referenced this pull request Nov 10, 2020
* Fixes #5722
* Handle zero-sized keys or values rust-lang/rust#77788
* Drop rust-1.33.0 BTreeMap/BTreeSet support
bors bot added a commit to intellij-rust/intellij-rust that referenced this pull request Nov 10, 2020
6356: DBG: Update BTreeMap/BTreeSet GDB pretty-printers r=Undin a=ortem

Update `BTreeMap`/`BTreeSet` GDB pretty-printers to the recent rustc's version.

* Fixes #5722

* Handle zero-sized keys or values rust-lang/rust#77788
I also added a fix to the original commit from rustc: `gdb.parse_and_eval("()")` instead of simple `"()"` in `children_of_node` method. This is needed because GDB treats `"()"` as a Rust array of two characters, not as a unit

After merge:
- [ ] Upstream a fix for zero-sized keys or values to rustc

Co-authored-by: ortem <ortem00@gmail.com>
bors bot added a commit to intellij-rust/intellij-rust that referenced this pull request Nov 10, 2020
6356: DBG: Update BTreeMap/BTreeSet GDB pretty-printers r=Undin a=ortem

Update `BTreeMap`/`BTreeSet` GDB pretty-printers to the recent rustc's version.

* Fixes #5722

* Handle zero-sized keys or values rust-lang/rust#77788
I also added a fix to the original commit from rustc: `gdb.parse_and_eval("()")` instead of simple `"()"` in `children_of_node` method. This is needed because GDB treats `"()"` as a Rust array of two characters, not as a unit

After merge:
- [ ] Upstream a fix for zero-sized keys or values to rustc

Co-authored-by: ortem <ortem00@gmail.com>
Undin pushed a commit to intellij-rust/intellij-rust that referenced this pull request Nov 12, 2020
* Fixes #5722
* Handle zero-sized keys or values rust-lang/rust#77788
* Drop rust-1.33.0 BTreeMap/BTreeSet support

(cherry picked from commit 04a7930)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants