<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69873>69873</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
mlirDataFormatters.py has bugs
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
onlytheworld
</td>
</tr>
</table>
<pre>
I am trying to debug the following code using lldb with DataFormatter scripts `llvm/utils/lldbDataFormatters.py` and `mlir/utils/lldb- scripts/mlirDataFormatters.py`.
```
class MyPass : public ::mlir::OperationPass<mlir::ModuleOp> {
...
}
void MyPass::runOnOperation() {
MLIRContext &context = getContext();
ConversionTarget target(context);
...
}
```
I set the first instruction of `runOnOperation` to a breakpoint and run the program.
Then I tried typing `p target`, but it got stuck.
![image](https://github.com/llvm/llvm-project/assets/37205103/47b9c0fa-8f5a-440e-a8d4-ef48ebf66449)
When I try to remove the script `mlir/utils/lldb-scripts/mlirDataFormatters.py` everything works fine, so I think the problem is in the [mlirDataFormatters.py](https://github.com/llvm/llvm-project/blob/main/mlir/utils/lldb-scripts/mlirDataFormatters.py).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVF2PqzYQ_TXmZZTImI_AAw-7m0Zaqautqiv12YYB3DU2soek-feVSei9XaWq9koID8zMmTNnRpYh6MEiNqx4ZsUxkQuNzjfOmiuNeHHedIly3bV5BTkB-au2A5CDDtUyAI0IvTPGXeLv1nUIS4imMZ2Ci6YRjpLkyflJEqGH0Ho9UwBWcmPOExOnhbQJTJxixr9iw36-spKDtF0Mn4z2n8J3GxwTp-h-lL5n_Mj40_1d8vuzfrZGhgBv19_iwbInmBdldBtNlj2tBVfrfUYvSTsbA1n28t3z5rrF4PvMsl-AHZ5vsAD7_Vb2cLwZZ6e7e6Vbpl_su_0HmImKifpHiLdfX39_cZbwLwImynYzsyMMSHfPLY1lW9aLs2f0QTv7TfoBCWg9mKjaLeGH6Ac0Pwn0CiGCxCFrHwi0DeSXNjIG18epfGqj5HE3JCiP8mN22tI6Pr_YFWX2bvByulf9NqKFVyCvsQO6znFvWMnnjXXJmXgBtRBogsERBFraj42ySFnxrCc5ICuOTFQj0bxqK05MnAZN46L2rZvWXTlvx2727k9siYmTDAHX1ckOghcpz5g45QdVt7yXu6ov5C7POe5k1eU77PMKVV-WeV5HDVcKf2z8r7Fpj5M749rmbSv_a2n_f2cBz-ivNEZBLs5_BOi1xShGcLHgqO3HpqcyOIEOoG8Ks-L5MerPaaSMU5Go1PbO96vdiPo-sKRrsq7Oaplgk5b1oS6rKq2Tscnrqq0ryVvZYyvLlld5lnKV1pVQRd5liW4EF1nKhUg552mx50WRFwclc-xFm_eC5Rwnqc0-st87PyQ6hAWbsq4OWWKkQhPW-00IixdYnUyIeN35Zu1YLUNgOTc6UPiOQpoMNg_7glEGiFnJ4k3zZV1XClG0leLfAQAA___n7MTn">