Skip to content

Commit 0bf0817

Browse files
committed
More robust sequence formatter
1 parent f725ad7 commit 0bf0817

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/etc/lldb_providers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,15 @@ def sequence_formatter(output: str, valobj: SBValue, _dict: LLDBOpaque):
238238
if len(output) > 32:
239239
long = True
240240
break
241+
241242
child: SBValue = valobj.GetChildAtIndex(i)
242-
output += f"{child.value}, "
243+
244+
summary = child.summary
245+
if summary is None:
246+
summary = child.value
247+
if summary is None:
248+
summary = "{...}"
249+
output += f"{summary}, "
243250
if long:
244251
output = f"(len: {length}) " + output + "..."
245252
else:

0 commit comments

Comments
 (0)