Skip to content

rust-lldb pretty-printing: cannot concatenate 'str' and 'NoneType' objects #22656

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

Closed
shepmaster opened this issue Feb 22, 2015 · 2 comments · Fixed by #23307
Closed

rust-lldb pretty-printing: cannot concatenate 'str' and 'NoneType' objects #22656

shepmaster opened this issue Feb 22, 2015 · 2 comments · Fixed by #23307
Assignees
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@shepmaster
Copy link
Member

This file:

fn main() {
    let v = vec![1,2,3];
}

compiled with rustc -g debug.rs, then debugged with rust-lldb debug. Trying to print a value as p v yields:

Traceback (most recent call last):
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 19, in print_val
    return print_struct_val(val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 44, in print_struct_val
    return print_struct_val_starting_from(0, val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 105, in print_struct_val_starting_from
    body = separator.join([render_child(idx) for idx in range(field_start_index, num_children)])
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 103, in render_child
    return this + print_val(field_val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 19, in print_val
    return print_struct_val(val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 44, in print_struct_val
    return print_struct_val_starting_from(0, val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 105, in print_struct_val_starting_from
    body = separator.join([render_child(idx) for idx in range(field_start_index, num_children)])
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 103, in render_child
    return this + print_val(field_val, internal_dict)
TypeError: cannot concatenate 'str' and 'NoneType' objects
Traceback (most recent call last):
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 19, in print_val
    return print_struct_val(val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 44, in print_struct_val
    return print_struct_val_starting_from(0, val, internal_dict)
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 105, in print_struct_val_starting_from
    body = separator.join([render_child(idx) for idx in range(field_start_index, num_children)])
  File "/rust/x86_64-apple-darwin/stage2/lib/rustlib/etc/lldb_rust_formatters.py", line 103, in render_child
    return this + print_val(field_val, internal_dict)
TypeError: cannot concatenate 'str' and 'NoneType' objects
$ lldb --version
lldb-320.4.152
$ rustc --version
rustc 1.0.0-dev (2b01a37ec 2015-02-21) (built 2015-02-21)
@alexcrichton
Copy link
Member

cc @michaelwoerister

@jdm jdm added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Feb 22, 2015
@michaelwoerister
Copy link
Member

Interesting. I thought we had a test case for simple vectors. Anyway, I'm on it.

@michaelwoerister michaelwoerister self-assigned this Feb 24, 2015
bors added a commit that referenced this issue Mar 13, 2015
Fixes #22656. Also adds a nice pretty printer for `Vec`.
Manishearth added a commit to Manishearth/rust that referenced this issue Mar 13, 2015
…=alexcrichton

 Fixes rust-lang#22656. Also adds a nice pretty printer for `Vec`.
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.

4 participants