Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debuginfo: Mangle tuples to be natvis friendly, typedef basic types #73715

Merged
merged 2 commits into from
Jul 12, 2020

Conversation

MaulingMonkey
Copy link
Contributor

These changes are meant to unblock #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, ...>)

- Mangles (T0, T1) as tuple<T0, T1>, possibly unblocking rust-lang#70052 "Update hashbrown to 0.8.0"
- Prettifies Rust tuples similar to VS2017's std::tuple
- Improves debuginfo test coverage
PDB debug information doesn't appear to be emitted for basic types.
By defining u32 as a typedef for unsigned __int32 when targeting MSVC,
we allow CDB and other debuggers to recognize "u32" as a type/expression.

This in turn unblocks rust-lang#70052 "Update hashbrown to 0.8.0" by
allowing $T1 ..= $T3 to resolve, which would otherwise fail to resolve
when builtin types fail to parse.
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

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

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable though I'm not really knowledgeable about the natvis support we have. cc @pnkfelix @nikomatsakis -- do we have folks we can ping on this? Maybe the windows group in general?

@nikomatsakis
Copy link
Contributor

I'm not sure but I bet somebody in that group has an idea or knows someone who can help!

@rustbot ping windows

@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2020

Hey Windows Group! This bug has been identified as a good "Windows candidate".
In case it's useful, here are some instructions for tackling these sorts of
bugs. Maybe take a look?
Thanks! <3

cc @arlosi @danielframpton @gdr-at-ms @kennykerr @luqmana @lzybkr @retep998 @rylev @sivadeilra @spastorino

@rustbot rustbot added the O-windows Operating system: Windows label Jun 26, 2020
@Amanieu
Copy link
Member

Amanieu commented Jul 11, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jul 11, 2020

📌 Commit 24a728a has been approved by Amanieu

@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 Jul 11, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 11, 2020
…manieu

debuginfo:  Mangle tuples to be natvis friendly, typedef basic types

These changes are meant to unblock rust-lang#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, ...>`)
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 11, 2020
…manieu

debuginfo:  Mangle tuples to be natvis friendly, typedef basic types

These changes are meant to unblock rust-lang#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, ...>`)
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 12, 2020
…arth

Rollup of 10 pull requests

Successful merges:

 - rust-lang#72920 (Stabilize `transmute` in constants and statics but not const fn)
 - rust-lang#73715 (debuginfo:  Mangle tuples to be natvis friendly, typedef basic types)
 - rust-lang#74066 (Optimize is_ascii for str and [u8].)
 - rust-lang#74116 (Fix cross compilation of LLVM to aarch64 Windows targets)
 - rust-lang#74167 (linker: illumos ld does not support --eh-frame-hdr)
 - rust-lang#74168 (Add a help to use `in_band_lifetimes` in nightly)
 - rust-lang#74197 (Reword incorrect `self` token suggestion)
 - rust-lang#74213 (Minor refactor for rustc_resolve diagnostics match)
 - rust-lang#74240 (Fix rust-lang#74081 and add the test case from rust-lang#74236)
 - rust-lang#74241 (update miri)

Failed merges:

r? @ghost
@bors bors merged commit 084ac77 into rust-lang:master Jul 12, 2020
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows 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.

9 participants