[Bug 16191] New: LLDB fails to evaluate expressions that dereference a struct when inferior is built with recent Clang

Bug ID 16191
Summary LLDB fails to evaluate expressions that dereference a struct when inferior is built with recent Clang
Product lldb
Version unspecified
Hardware PC
OS All
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter daniel.malea@intel.com
Classification Unclassified

Created attachment 10606 [details]
expression evaluation log (failing) missing struct declaration

This issue appears when using ToT Clang to build the LLDB test suite. The
failure is reproducible in Test-rdar-9973865, either with the harness or
manually. To reproduce with the test, do:

python dotest --executable <path-to-lldb> -p Test-rdar-9973865

To reproduce manually:

cd <lldb-dir>/test/functionalities/data-formatter/rdar-9973865
make CC=/path/to/recent/clang
lldb ./a.out
(lldb) b 27
(lldb) run
(lldb) print *mine_ptr

Expected result: lldb prints contents of the struct.

Actual result:

error: incomplete type 'summarize_t' (aka 'Summarize') where a complete type is
required
note: forward declaration of 'Summarize'
error: 1 errors parsing expression

However, the 'summarize_t' type is declared in the main.cpp file, but LLDB
doesn't seem to pass this declaration on to Clang. Not sure if this is really
an LLDB bug, or an Clang bug.

Daniel Malea changed bug 16191

What | Removed | Added |

  • | - | - |
    Status | NEW | RESOLVED |
    Resolution | — | DUPLICATE |

Comment # 2 on bug 16191 from Daniel Malea

After some discussion with Greg, it turns out this is not really an LLDB bug,
but  a clang one instead. I filed llvm.org/pr16214 instead.

*** This bug has been marked as a duplicate of bug 16214 ***