<div dir="ltr">Can you also try clang-cl and see if it works?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 20, 2015 at 3:02 AM Tamas Berghammer via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I don't know how JIT debugging should work on WIndows with MSVC but I don't think LLDB support it in any way. What I wrote should be true on Linux (and on some related) systems. You might be able to get the same results on Windows if you use lli (LLVM based JIT runner) but I have no knowledge if it will work or not.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 20, 2015 at 8:56 AM haifeng_q <<a href="mailto:haifeng_q@foxmail.com" target="_blank">haifeng_q@foxmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>My analysis of the code, the reasons are:</div>
<div> </div>
<div>
<div><span>Since the</span> <span>debugging process</span> <span>is</span> <span>MSVC</span> <span>compiler</span><span>,</span> there is <span>no</span> <span>DWARF</span> <span>debugging information. So</span> <span>lldb</span> <span>get</span> <span>__jit_debug_register_code</span> <span>and</span> <span>__it_debug_descriptor</span> <span>symbol</span> <span>debugging process</span> <span>fails</span><span>,</span> <span>and</span> <span>__jit_debug_register_code</span> <span>not</span> <span>support</span> <span>MSVC.</span><br></div>
<div>I do not know whether correct?</div>
<div><br></div>
<div style="FONT-SIZE:12px;FONT-FAMILY:Arial Narrow;PADDING-BOTTOM:2px;PADDING-TOP:2px;PADDING-LEFT:0px;PADDING-RIGHT:0px">------------------ <span style="BORDER-TOP:0px;BORDER-RIGHT:0px;WHITE-SPACE:normal;WORD-SPACING:0px;BORDER-BOTTOM:0px;TEXT-TRANSFORM:none;COLOR:rgb(67,67,67);OUTLINE-WIDTH:0px;PADDING-BOTTOM:0px;TEXT-ALIGN:left;PADDING-TOP:0px;FONT:12px/24px Tahoma,Arial;OUTLINE-STYLE:none;PADDING-LEFT:0px;BORDER-LEFT:0px;MARGIN:0px;LETTER-SPACING:normal;OUTLINE-COLOR:invert;PADDING-RIGHT:0px;BACKGROUND-COLOR:rgb(242,242,242);TEXT-INDENT:0px">original</span><span style="WHITE-SPACE:normal;WORD-SPACING:0px;TEXT-TRANSFORM:none;FLOAT:none;COLOR:rgb(67,67,67);TEXT-ALIGN:left;FONT:12px/24px Tahoma,Arial;DISPLAY:inline!important;LETTER-SPACING:normal;BACKGROUND-COLOR:rgb(242,242,242);TEXT-INDENT:0px"><span> </span></span><span style="BORDER-TOP:0px;BORDER-RIGHT:0px;WHITE-SPACE:normal;WORD-SPACING:0px;BORDER-BOTTOM:0px;TEXT-TRANSFORM:none;COLOR:rgb(67,67,67);OUTLINE-WIDTH:0px;PADDING-BOTTOM:0px;TEXT-ALIGN:left;PADDING-TOP:0px;FONT:12px/24px Tahoma,Arial;OUTLINE-STYLE:none;PADDING-LEFT:0px;BORDER-LEFT:0px;MARGIN:0px;LETTER-SPACING:normal;OUTLINE-COLOR:invert;PADDING-RIGHT:0px;BACKGROUND-COLOR:rgb(242,242,242);TEXT-INDENT:0px">message</span>------------------</div>
<div style="FONT-SIZE:12px;BACKGROUND:#efefef;PADDING-BOTTOM:8px;PADDING-TOP:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px">
<div><b>From:</b>"Tamas Berghammer";<a href="mailto:tberghammer@google.com" target="_blank">tberghammer@google.com</a>;</div>
<div>Date<strong>:</strong>2015年11月19日 PM 8:37</div>
<div><b>receive:</b> " "<<a href="mailto:haifeng_q@foxmail.com" target="_blank">haifeng_q@foxmail.com</a>>; "lldb-dev"<<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>>; </div>
<div></div>
<div><b>Subject:</b> Re: [lldb-dev] lldb debug jit-compiled code with llvm on windows</div></div>
<div><br></div>
<div dir="ltr">In theory you don't have to do anything special to debug some JIT-ed code as everything should just work (based on the gdb jit interface). In practice I tried it out a few days ago and it wasn't working at all even in the case when the application is launched under LLDB (not with attach). LLDB was understanding the eh_frame for the JIT-ed code but didn't found the debug info for unknown reason. We should investigate it and try to fix it sometime. We (lldb for android developers) plan to do it sometime but if you are interested in it then please feel free to take a look and let us know if you have any question.
<div><br></div>
<div>Tamas</div></div><br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Nov 19, 2015 at 8:40 AM haifeng_q via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br></div>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex">
<div><span>hi,</span></div>
<div><span>process <span>A</span> </span><span>generate</span> function Func1 code with llvm jit compiler<span>,</span> <span>and</span> <span>calls </span><span>Func1</span><span>. modeled on</span> <span>"Kaleidoscope: Adding Debug Information"</span> <span>add</span> <span>debug information</span><span>. how</span> <span>to use</span> <span>LLDB</span> to attach process <span>A</span> to <span>debug this</span> <span>function</span><span>,</span> <span>add a breakpoint in the function?</span></div>
<div><span></span> </div>
<div><span>thanks!</span></div>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br></blockquote></div>
<div></div></div></blockquote></div>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>