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

extra namespace in DWARF on nightly #33193

Closed
tromey opened this issue Apr 25, 2016 · 2 comments
Closed

extra namespace in DWARF on nightly #33193

tromey opened this issue Apr 25, 2016 · 2 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@tromey
Copy link
Contributor

tromey commented Apr 25, 2016

There is a test in our gdb work that has a unit-like struct:

pub struct Unit;

This is in a crate named simple.

In 1.8 this ended up as a struct Unit in a namespace simple; so in gdb print could easily display simple::Unit, as that was the name of the type.

In nightly there is an extra namespace:

 <2><16d>: Abbrev Number: 3 (DW_TAG_namespace)
    <16e>   DW_AT_name        : (indirect string, offset: 0x1da): Unit
    <172>   DW_AT_decl_file   : 1
    <173>   DW_AT_decl_line   : 45
 <3><174>: Abbrev Number: 11 (DW_TAG_structure_type)
    <175>   DW_AT_name        : (indirect string, offset: 0x1da): Unit
    <179>   DW_AT_byte_size   : 0

... so now the type is named simple::Unit::Unit.

I think the 1.8 behavior was preferable. I don't think the extra namespace serves a useful purpose.

@sanxiyn sanxiyn added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Apr 25, 2016
@michaelwoerister
Copy link
Member

Yes, definitely seems like a regression.

@tromey
Copy link
Contributor Author

tromey commented Apr 27, 2016

In case it matters I see this in beta as well.

bors added a commit that referenced this issue Apr 29, 2016
debuginfo: Fix regression in namespace handling for struct types.

Fixes a small regression that has been introduced in recent refactorings.

Fixes #33193

r? @eddyb
bors added a commit that referenced this issue May 2, 2016
debuginfo: Fix regression in namespace handling for struct types.

Fixes a small regression that has been introduced in recent refactorings.

Fixes #33193

r? @eddyb
Manishearth added a commit to Manishearth/rust that referenced this issue May 2, 2016
…ct-ns, r=eddyb

debuginfo: Fix regression in namespace handling for struct types.

Fixes a small regression that has been introduced in recent refactorings.

Fixes rust-lang#33193

r? @eddyb
bors added a commit that referenced this issue May 6, 2016
debuginfo: Fix regression in namespace handling for struct types.

Fixes a small regression that has been introduced in recent refactorings.

Fixes #33193

r? @eddyb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants