<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61724>61724</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb] `lldb` fails to obtain the value of a DW_OP_implicit_pointer
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jwnhy
</td>
</tr>
</table>
<pre>
Tested on top-of-tree `lldb`
Given the following code (the complicated part is just to avoid optimization)
```c
#include "stdint.h"
struct a {
signed b : 2;
} c;
int d, e;
int f[1][10][10];
static int func_2(struct a g) {
int8_t h = -24;
uint64_t *i = (uint64_t*)&d;
int32_t *j = (uint32_t*)f;
int8_t *l_115;
int8_t **k = &l_115;
int32_t l = e = g.b | (*i = 9);
*j = (l = j && ((*k = &h) || 7) << f[1][2][7]) && *j;
}
int main() { func_2(c); }
```
Compile it with `gcc -O1 -g`
The DWARF information generated for `l_115` will be a DW_OP_implicit_pointer, which `lldb` seems not being able to decode.
It generates the following error
> error: error: Couldn't materialize: couldn't get the value of variable l_115: Could not evaluate DW_OP_implicit_pointer.
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression
`gdb` can correctly recognize DW_OP_implicit_pointer and output the value of `*l_115=-24`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VFFv4joT_TXmZQRKHEjIAw-UlE_7vezqqtI-IseZJOYaO7InZdtff2WHQlptJYRjz8yZ45kzFt6rziDu2OaJbaqFGKm3bne-mv5tUdvmbfeCnrABa4DssLTtkhwisDzRuqlZnrCkYsl--v-fekUD1CO0Vmt7VaYDaRsExrfhVNrLoJUUAXAQjkB5OI-egCyIV6sasAOpi3oXpKxhvLyB58n0k7c9z5SReozA3FOjDK16xvlk9uRGSSCAFU_TCUC8ZQM1sGwPnGU3AysqkPedMgQN4wfAT0ct2zylbFOFJZmvH06eBCkJ0Xc08sQZ395JdIyX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