lldb-formatters: Use StdSliceSyntheticProvider for &str
This commit is contained in:
parent
100b123a0d
commit
330ce83a8d
5 changed files with 70 additions and 4 deletions
|
|
@ -92,7 +92,7 @@ def synthetic_lookup(valobj, dict):
|
|||
return StdVecSyntheticProvider(valobj, dict)
|
||||
if rust_type == RustType.STD_VEC_DEQUE:
|
||||
return StdVecDequeSyntheticProvider(valobj, dict)
|
||||
if rust_type == RustType.STD_SLICE:
|
||||
if rust_type == RustType.STD_SLICE or rust_type == RustType.STD_STR:
|
||||
return StdSliceSyntheticProvider(valobj, dict)
|
||||
|
||||
if rust_type == RustType.STD_HASH_MAP:
|
||||
|
|
|
|||
|
|
@ -159,6 +159,9 @@ def StdStrSummaryProvider(valobj, dict):
|
|||
# logger = Logger.Logger()
|
||||
# logger >> "[StdStrSummaryProvider] for " + str(valobj.GetName())
|
||||
|
||||
# the code below assumes non-synthetic value, this makes sure the assumption holds
|
||||
valobj = valobj.GetNonSyntheticValue()
|
||||
|
||||
length = valobj.GetChildMemberWithName("length").GetValueAsUnsigned()
|
||||
if length == 0:
|
||||
return '""'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue