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

Fix debug representation of arrays of structs #1340

Closed
jdm opened this issue Dec 19, 2011 · 5 comments
Closed

Fix debug representation of arrays of structs #1340

jdm opened this issue Dec 19, 2011 · 5 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@jdm
Copy link
Contributor

jdm commented Dec 19, 2011

"Up-to-date" test case:

fn main() {
    struct moo {a: float};
    let x = [moo{a: 1.5}, moo{a: 2.3}];
    io::println(fmt!("%?", x));
}

(build with rustc -Z debug-info, then load it up in gdb and set a breakpoint on main.)

Original reported test case follows

let x = [{a: 1.5},{a: 2.3}]

The values of a in gdb are wildly incorrect.

@marijnh
Copy link
Contributor

marijnh commented Jan 13, 2012

Objs are no longer with us.

@marijnh marijnh closed this as completed Jan 13, 2012
@jdm jdm reopened this Jan 14, 2012
@jdm
Copy link
Contributor Author

jdm commented Jan 14, 2012

This was a poorly worded issue.

@ghost ghost assigned jdm Apr 12, 2012
@catamorphism
Copy link
Contributor

(And if that doesn't work, I bet debug representations of classes don't work either :-)

@pnkfelix
Copy link
Member

This is blocked by Issue #5836

@huonw
Copy link
Member

huonw commented Aug 14, 2013

Triage visit: #5836 is closed, @michaelwoerister has done amazing work, and this is fixed!

fn main() {
    struct moo {a: float};
    let x = [moo{a: 1.5}, moo{a: 2.3}];
    printfln!("%?", x);
}
$ rustc -Z debug-info -Z extra-debug-info 1340.rs
(gdb) break 4
[...]
(gdb) r
[...]
(gdb) p x
$1 = {{a = 1.5}, {a = 2.2999999999999998}}

@huonw huonw closed this as completed Aug 14, 2013
@jdm jdm removed their assignment Jun 16, 2014
bjorn3 added a commit to bjorn3/rust that referenced this issue Jan 24, 2023
Push up a lot of rustc and cargo references
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Update toolchain to 2022-07-05

The updates required were related to the following changes:
  - Simplify memory ordering intrinsics
    - rust-lang#97423
  - once cell renamings
    - rust-lang#98165
  - Rename the ConstS::val field as kind
    - rust-lang#97935
  - Remove the source archive functionality of ArchiveWriter
    - rust-lang#98098
  - Use valtrees as the type-system representation for constant values
    - rust-lang#96591

* Codegen unimplemented for unsupported constant slices

See model-checking/kani#1339 for more details.

* Fix copyright check

* Use codegen_option_span instead
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
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

5 participants