Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] lldb fails to obtain the value of a DW_OP_implicit_pointer #61724

Open
jwnhy opened this issue Mar 27, 2023 · 2 comments
Open

[lldb] lldb fails to obtain the value of a DW_OP_implicit_pointer #61724

jwnhy opened this issue Mar 27, 2023 · 2 comments

Comments

@jwnhy
Copy link
Contributor

jwnhy commented Mar 27, 2023

Tested on top-of-tree LLDB

Given the following code (the complicated part is just to avoid optimization)

#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

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 27, 2023

@llvm/issue-subscribers-lldb

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 27, 2023

@llvm/issue-subscribers-debuginfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants