[lldb-dev] problems using EvaluateExpression in lldb, when it creates new object
fhjiwerfghr fhiewrgfheir via lldb-dev
lldb-dev at lists.llvm.org
Fri Jan 14 10:13:02 PST 2022
I'm sorry in advance, if it's not a correct mailing list, there doesn't
seem to be lldb-usage mailing list.
I'm writing a pretty-printer python script, which - to cut to the chase,
pretty prints members of a class by using EvaluateExpression and creating
new object inside it. It doesn't seem to work - i'm getting "<could not
resolve type>" error. Should my idea work in a first place and i't s a bug
or it shouldn't and i need to find a different solution?
I'm attaching a repro case:
clang++ q.cpp -g -o o -std=c++20
lldb o
command script import lldb_script.py
br set --file q.cpp --line 19
r
print c
it prints:
(lldb) print c
(C) $0 = CCC {
= <could not resolve type>
}
it should something akin to:
(lldb) print c
(C) $0 = CCC {
b = B {
a = A {
id = "qwerty"
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20220114/f27045c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: q.cpp
Type: text/x-c++src
Size: 261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20220114/f27045c7/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb_script.py
Type: text/x-python
Size: 5035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20220114/f27045c7/attachment.py>
More information about the lldb-dev
mailing list