mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-26 23:21:11 +00:00
[llvm][utils] Fix SmallString summary provider (#78527)
Fixes `SmallString` summary provider, which was incorrectly producing the empty string. Initially I thought the strings I was debugging were empty for unknown reasons, but that was not the case.
This commit is contained in:
parent
2663d2cb9c
commit
45d1cca339
@ -218,12 +218,14 @@ class OptionalSynthProvider:
|
||||
|
||||
|
||||
def SmallStringSummaryProvider(valobj, internal_dict):
|
||||
num_elements = valobj.GetNumChildren()
|
||||
# The underlying SmallVector base class is the first child.
|
||||
vector = valobj.GetChildAtIndex(0)
|
||||
num_elements = vector.GetNumChildren()
|
||||
res = '"'
|
||||
for i in range(0, num_elements):
|
||||
c = valobj.GetChildAtIndex(i).GetValue()
|
||||
for i in range(num_elements):
|
||||
c = vector.GetChildAtIndex(i)
|
||||
if c:
|
||||
res += c.strip("'")
|
||||
res += chr(c.GetValueAsUnsigned())
|
||||
res += '"'
|
||||
return res
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user