<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/97331>97331</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb] Summary string parsing error for strings with bitfield syntax
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
wardw
</td>
</tr>
</table>
<pre>
On update from lldb 16 to 18 I observe that summary strings that include the documented bitfield syntax no longer parse, reporting _"error: summary string parsing error"_ instead.
Taking the example directly from the [documentation](https://lldb.llvm.org/use/variable.html#bitfields-and-array-syntax), and a vanilla instance of `lldb`
> lldb --no-lldbinit
>> expr 1234.f # Prints OK
(float) $0 = 1234
>> type summary add --summary-string "Sign: ${var[31]%B} Exponent: ${var[30-23]%x} Mantissa: ${var[0-22]%u}" float
>> expr 1234.f
(float) $1 = 1234 error: summary string parsing error
This was working fine with lldb 16. The above was tested with lldb version 18.1.6 packaged for Fedora 40.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVNGumzgQ_ZrhZQQCAyE88HDvppFWq1VXat-rAU_AW2Mj25Dk71fATe9tVqqahxiYM_ac4zND3qveMDdQvkJ5imgOg3XNlZy8Rq2V9-azwXmSFBgvzo6otWwxO2CwmB3xT7StZ7cwhoEC-nkcyd3RB6dM7_ePynR6liuCUdpuHtkEltiqcFGsJfq7CXRDY1Fb07PDiZxnEH-g48m6oEyP30AIds46yF-eTtng67rHhfiGyvjAJBNIT5C-7P9f6fsKWovgG42TZpTKcRf0fSe2RqB8fVRIQVkD5QnEcQhh8pC_gDiDOK8CJFovY2JdD-I8r7WeF3KKWs3JEEYNIn-w8zEZGZNzdI93oiDqlRsZiYQLGaU1bRWT6RjtBeGQrmfAIf1YPyIi5J92_ePY2Hh9UkaFn-IrhG-Tw0zkRXLB9x-IHP9xygSPn__6kCOOF20pgKgRRJEi5Kct-S3refNwn_jHDZCUGMdvb_HbfYAQX1Rv1psCUUD1upCD8jXPNjXLV6hO-Ok2WcMm_A-UxiLfcbcV9zeZoLynZ1waC7HDZqhOIATuJH4hxVvsiW_2zvf3_PXRUoPyeCWPV-s2c12UYbyqMDy6JEH8OjBSaxfekIH96v13zMLOK2swOyZZcsCJuu_Us8SLdXhmaR1hkSaRbHJZ5zVF3GRVVh_LsqhENDTUyayo245Z1mV-rCsuioto20tdHYlkHalGpKJIqzTLqrwq6kSmh7rO0u5Ql2WVyxSKlEdS-oelI-X9zE1d5XkWaWpZ-204CGH4ilsQNvEj16w5cTv3HopUKx_8-y5BBb1Nlc3L5Qm__ELVje5jaGziPE2HaHa6-bkPexWGuU06O25NuTyWeHL2X-4CiPNWrAdx3sksjfgvAAD__6hbi-A">