[Lldb-commits] [RFC] Type lookup for template types is broken...
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue May 8 10:35:25 PDT 2018
I made a small experiment where I manually edited the DW_AT_name in the assembler output:
Baseline:
$ lldb with_params
(lldb) target create "with_params"
(lldb) b 5
(lldb) r
Process 28369 stopped
* thread #1, name = 'with_params', stop reason = breakpoint 1.1
frame #0: 0x00000000004004fc with_params`main(argc=1, argv=0x00007fffffffe578) at template.cpp:5
2
3 int main(int argc, char **argv) {
4 MyC<int> c = {23};
-> 5 return c.t;
6 }
Target 0: (with_params) stopped.
(lldb) p c
(MyC<int>) $0 = (t = 23)
^^^^^^^^^^
Without the parameters:
$ lldb no_params
(lldb) target create "no_params"
(lldb) b 5
* thread #1, name = 'no_params', stop reason = breakpoint 1.1
frame #0: 0x00000000004004fc no_params`main(argc=1, argv=0x00007fffffffe588) at template.cpp:5
2
3 int main(int argc, char **argv) {
4 MyC<int> c = {23};
-> 5 return c.t;
6 }
Target 0: (no_params) stopped.
(lldb) p c
(MyC) $0 = (t = 23)
^^^^^
Note how lldb uses the typename to print the result type of the expression.
-- adrian
More information about the lldb-commits
mailing list