xcode - llvm reports error declared with incompatible types in different translation units -
i'm trying debug c++ os x application in xcode 5.1 (5b130a) under os x 10.9.2. application composed of various library projects compiled libraries , used in main application project.
i set breakpoint in code , when run in lldb:
expr 2
this get:
(lldb) expr 2 error: field '__f_' declared incompatible types in different translation units ('__base *' (aka 'std::__1::__function::__base<void (std::__1::shared_ptr<const xxx>, const yyy &)> *') vs. '__base *' (aka 'std::__1::__function::__base<void> *')) error: field '__f_' declared incompatible types in different translation units ('__base *' (aka 'std::__1::__function::__base<void (std::__1::shared_ptr<const xxx>, const yyy &)> *') vs. '__base *' (aka 'std::__1::__function::__base<void> *')) error: expected expression note: declared here type '__base *' (aka 'std::__1::__function::__base<void> *') note: declared here type '__base *' (aka 'std::__1::__function::__base<void> *') error: 3 errors parsing expression
please note if set breakpoint somewhere else in code, same command might work (but not everywhere). leads me think specific library i'm breaking in makes difference.
i understand somewhere there definition std::function<void(std::shared_ptr<const xxx>, const yyy&)>
, other translation unit sees different definition, (i believe __f_
internal field of std::function templated class), it's not clear me:
- why doesn't linker complain it? (in fact, app running perfectly)
- what code generation switch mismatch cause this? checked
gcc_optimization_level
(all-o0
),copy_phase_strip
, ...
thanks!
this problem debug information rather generated code, why app runs correctly expression evaluator in debugger fails.
the debugger tries read least amount of debug information needs in order whatever ask to. until causes read in 2 modules have disagreeing debug information, won't see problem. that's why happens , doesn't.
anyway, please file bug bugreporter.apple.com.
Comments
Post a Comment