Skip to content

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

Closed
@shepmaster

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)

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