Skip to content

Bundled pretty-printer for LLDB: VecDeque support #3017

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

Merged
merged 1 commit into from
Nov 23, 2018

Conversation

artemmukhin
Copy link
Member

@artemmukhin artemmukhin commented Nov 6, 2018

This PR adds VecDeque support to LLDB pretty-printers.

vd1

vd2

Merge after #3008.

@Undin
Copy link
Member

Undin commented Nov 10, 2018

I haven't reviewed it yet but at first glance, it seems that you add some code related to Rc and Arc in this PR by accident
Could you please leave changes related to VecDec only?

@artemmukhin artemmukhin force-pushed the debugger-stdvecdeque branch 2 times, most recently from 75b1b66 to 3c42812 Compare November 13, 2018 10:27
@artemmukhin
Copy link
Member Author

@Undin Done.

@Undin
Copy link
Member

Undin commented Nov 13, 2018

The current implementation doesn't take into account that VecDeque uses internal vector as ring buffer, i.e. head can be less than tail and vice versa.

If we run this code:

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);
}

we get the following
image

@artemmukhin
Copy link
Member Author

@Undin Thanks for this note! I just cloned the original implementation, so I opened the corresponding issue.

@Undin
Copy link
Member

Undin commented Nov 23, 2018

bors r+

bors bot added a commit that referenced this pull request Nov 23, 2018
3017: Bundled pretty-printer for LLDB: VecDeque support r=Undin a=ortem

This PR adds `VecDeque` support to LLDB pretty-printers.

<img width="266" alt="vd1" src="https://user-images.githubusercontent.com/4854600/48424540-eee46180-e773-11e8-851e-efb019c5235b.png">
<img width="436" alt="vd2" src="https://user-images.githubusercontent.com/4854600/48424542-ef7cf800-e773-11e8-8a97-e6625f25c195.png">


Merge after #3008.

Co-authored-by: ortem <[email protected]>
@bors
Copy link
Contributor

bors bot commented Nov 23, 2018

@bors bors bot merged commit 7812fc2 into intellij-rust:master Nov 23, 2018
bors bot added a commit that referenced this pull request Nov 25, 2018
3024: Bundled pretty-printer for LLDB: Rc, Arc support r=Undin a=ortem

This PR adds `Rc` and `Arc` support to LLDB pretty-printers.

<img width="374" alt="rc1" src="https://user-images.githubusercontent.com/4854600/48424354-86958000-e773-11e8-971d-e0fdeeb2eadb.png">
<img width="334" alt="rc2" src="https://user-images.githubusercontent.com/4854600/48424355-86958000-e773-11e8-9d02-233e00ff62fb.png">


Merge after #3017.


Co-authored-by: ortem <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants