justin chase via llvm-dev
2015-Nov-21 19:37 UTC
[llvm-dev] Passing "/DEBUG" to llvm-lib on windows
This is all on Windows. I think I need to pass "/DEBUG": https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx When compiling via llvm-lib: http://llvm.org/docs/CommandGuide/llvm-lib.html However, it seems like llvm-lib doesn't know about this flag and I can't seem to figure out how to get it to do the equivalent. Basically when I am attempting to debug, I have a pdb and it is loading symbol information but it does not contain file or line number information and I can only step into functions as assembly. I am compiling some code into objects, then into a .lib, then linking with clang-cl that lib plus more objects. When I do this I am unable to step into any of my code though I can see the function names in the callstack. I am trying to set /DEBUG with calls to llvm-lib and I am setting the flags /Md /Zi /DEBUG when calling clang-cl. Am I missing something? -- http://justinmchase.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151121/231a64b7/attachment.html>
Reid Kleckner via llvm-dev
2015-Nov-23 21:24 UTC
[llvm-dev] Passing "/DEBUG" to llvm-lib on windows
I don't think either lib.exe or llvm-lib care about /debug. It shouldn't do anything. Make sure /Zi or /Z7 is getting through to clang-cl during the compile step, and make sure /DEBUG is getting through to link.exe in the link step. This should allow function stepping in windbg or VS. On Sat, Nov 21, 2015 at 11:37 AM, justin chase via llvm-dev < llvm-dev at lists.llvm.org> wrote:> This is all on Windows. > > I think I need to pass "/DEBUG": > https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx > > When compiling via llvm-lib: > http://llvm.org/docs/CommandGuide/llvm-lib.html > > However, it seems like llvm-lib doesn't know about this flag and I can't > seem to figure out how to get it to do the equivalent. > > Basically when I am attempting to debug, I have a pdb and it is loading > symbol information but it does not contain file or line number information > and I can only step into functions as assembly. > > I am compiling some code into objects, then into a .lib, then linking with > clang-cl that lib plus more objects. When I do this I am unable to step > into any of my code though I can see the function names in the callstack. > > I am trying to set /DEBUG with calls to llvm-lib and I am setting the > flags /Md /Zi /DEBUG when calling clang-cl. Am I missing something? > > -- > http://justinmchase.com > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151123/3102e4c7/attachment.html>