<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/137468>137468</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            lldb cannot change formatting of uint8_t[35] to print as an array of integers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dmlary
      </td>
    </tr>
</table>

<pre>
    I've been fighting with this across multiple versions of lldb.  I'm trying to print a `uint8_t[32]` as an array of unsigned integers, but it keeps printing as a binary string.  What follows is all the different ways I tried manually setting the format manually to `dwim-print`, and using `type format add`.  Regardless of what I do, the variable is always formatted as a binary string.

```txt
# uint8_t PatternIndex[6][35] = {...}
(lldb) dwim-print -f int8_t[] -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f a -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f A -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) type format clear
(lldb) dwim-print -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f b -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f x -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f uint8_t[] -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f int -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) dwim-print -f E -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) type format add --format int uint8_t
(lldb) dwim-print -- PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
(lldb) type format info PatternIndex[1]
no format applies to (const uint8_t[35]) PatternIndex[1]
(lldb) type format add --format int uint8_t[35]
(lldb) type format info PatternIndex[1]
format applied to (const uint8_t[35]) PatternIndex[1] is: int8_t[]
(lldb) p PatternIndex[1]
(const uint8_t[35]) "\0\U00000001\b\U0000001b\"\a\U00000002\U00000003\U00000004\U00000005\U00000006\U0000000e\t\n\v\f\r!\U0000001c\U0000001d\U0000001e\U0000001f \U00000019\U0000001a\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018"
```

LLDB versions tested:
* lldb version 20.1.3
* lldb-1600.0.39.10 (Apple clang)

Anyone got a suggestion how to just print it as an array of integer values?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsmM9r4zgUx_8a5fKIsWTLTg4-5McGCnNYFpY9LrL9bGtWkYwkJ81_v8hJW7VMB2ZOKaQY-lT5_dLnuXG-wjnZa8SK8C3h-4WY_GBs1R6VsJdFbdpL9URYeUKoETV0sh-81D2cpR_AD9KBaKxxDo6T8nJUCCe0ThrtwHSgVFsnACHCEby9BE9vYLRSexBAinSS2q_-9YRvM0b4nhQpCAdCg7BWXEKMSc8VtiC1xx6tI2wH9eRBevgPcXTXcCF08IRaamEv4LyVuk8A_hmEh84oZc4OQr1KgR8QWtl1aFF7OIuLgyfwVmILR6EnodQFHPo5aLi3M_Yo_NueN6H29iyPyzk5KdJQldAtTC44kSL1l_HVUbQtKdI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