You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
debuginfo: by-value function parameters are not described correctly. #8512
When breaking in struct_fun() GDB will report that there is no variable with name by_val. The reason is that by_val, having a non-immediate type, is really passed by reference as far as LLVM is concerned (see trans::base::copy_args_to_allocas()). The ty::t associated with the value, however, is still the non-pointer type. LLVM does not seem to like this during codegen and silently omits the debug info entry for the parameter (see CompileUnit::constructVariableDIE() in llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp). Consequently, GDB won't find anything for the name by_val.
A fix will probably involve DIBuilder::createComplexVariable().
Update: After some research it seems that this is not fixable without LLVM modifications. That's the bad news. The good news is that clang has the same problem and there is some work under way to support this case in the DIBuilder: llvm-mirror/llvm@c971cb8
Activity
michaelwoerister commentedon Aug 15, 2013
Update: After some research it seems that this is not fixable without LLVM modifications. That's the bad news. The good news is that clang has the same problem and there is some work under way to support this case in the
DIBuilder: llvm-mirror/llvm@c971cb8The fix does not seem to be finished yet though.
alexcrichton commentedon Aug 15, 2013
That llvm commit will probably get included in #8328
debuginfo: Added support for self parameter in methods.
Auto merge of rust-lang#9707 - Alexendoo:file-depinfo, r=flip1995
Merge rust-lang#9747