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

gdb VecDeque pretty printer is incorrect #55944

Closed
artemmukhin opened this issue Nov 14, 2018 · 0 comments · Fixed by #55961
Closed

gdb VecDeque pretty printer is incorrect #55944

artemmukhin opened this issue Nov 14, 2018 · 0 comments · Fixed by #55961
Assignees
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@artemmukhin
Copy link
Contributor

As noted here, the VecDeque pretty-printer doesn't take into account the ring buffer structure.

Example:

use std::collections::VecDeque;

fn main() {
    let mut deque = VecDeque::new();
    for i in 1..8 {
        deque.push_back(i)
    }
    deque.pop_front();
    deque.push_back(8);
    println!("{:?}", deque);
}

Run gdb with b 10:

(gdb) p deque
$2 = VecDeque<i32>(len: -1, cap: 8)
@tromey tromey added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Nov 14, 2018
@tromey tromey self-assigned this Nov 14, 2018
tromey added a commit to tromey/rust that referenced this issue Nov 14, 2018
This fixes the VecDeque pretty-printer to handle cases where
head < tail.
Closes rust-lang#55944
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Nov 22, 2018
…tsakis

Fix VecDeque pretty-printer

This fixes the VecDeque pretty-printer to handle cases where
head < tail.
Closes rust-lang#55944
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

Successfully merging a pull request may close this issue.

2 participants