Skip to content

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

Description

@shepmaster

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)

Activity

  1. alexcrichton commented on Feb 22, 2015

    @alexcrichton
    Member
  2. added
    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
    on Feb 22, 2015
  3. michaelwoerister commented on Feb 24, 2015

    @michaelwoerister
    Member

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

  4. added a commit that references this issue on Mar 13, 2015
    ee76963
  5. added a commit that references this issue on Mar 13, 2015
    7d2ee7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions