-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.