Closed
Description
If path
is a PathBuf, printing it from lldb does not give a string representation as I would expect.
(lldb) frame variable path
Traceback (most recent call last):
File "/home/thayne/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py", line 99, in print_val
is_tuple_like = False)
File "/home/thayne/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py", line 220, in print_struct_val
body = separator.join([render_child(idx) for idx in range(field_start_index, len(fields))])
File "/home/thayne/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py", line 213, in render_child
return this + print_val(field_val.get_wrapped_value(), internal_dict)
TypeError: cannot concatenate 'str' and 'NoneType' objects
(std::path::PathBuf) path = {
inner = None
}
If I explicitly refer to path.inner it shows "None" for the inner OsString:
(lldb) frame variable path.inner
(std::ffi::os_str::OsString) path.inner = None
If I use path.inner.inner
I finally get a vec representation.