<DIV>My analysis of the code, the reasons are:</DIV>
<DIV> </DIV>
<DIV>
<DIV><SPAN class=hps>Since the</SPAN> <SPAN class=hps>debugging process</SPAN> <SPAN class=hps>is</SPAN> <SPAN class=hps>MSVC</SPAN> <SPAN class=hps>compiler</SPAN><SPAN>,</SPAN> there is <SPAN class=hps>no</SPAN> <SPAN class=hps>DWARF</SPAN> <SPAN class=hps>debugging information. So</SPAN> <SPAN class=hps>lldb</SPAN> <SPAN class=hps>get</SPAN> <SPAN class=hps>__jit_debug_register_code</SPAN> <SPAN class=hps>and</SPAN> <SPAN class=hps>__it_debug_descriptor</SPAN> <SPAN class=hps>symbol</SPAN> <SPAN class=hps>debugging process</SPAN> <SPAN class=hps>fails</SPAN><SPAN>,</SPAN> <SPAN class=hps>and</SPAN> <SPAN class=hps>__jit_debug_register_code</SPAN> <SPAN class=hps>not</SPAN> <SPAN class=hps>support</SPAN> <SPAN class=hps>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 id=blng_part_tran_1_2 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; -webkit-text-stroke-width: 0px" data-aligning="#blng_part_src_1_5,#blng_part_tran_1_2">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; -webkit-text-stroke-width: 0px"><SPAN class=Apple-converted-space> </SPAN></SPAN><SPAN id=blng_part_tran_1_3 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; -webkit-text-stroke-width: 0px" data-aligning="#blng_part_src_1_6,#blng_part_tran_1_3">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">tberghammer@google.com</A>;</DIV>
<DIV>Date<STRONG>:</STRONG>2015Äê11ÔÂ19ÈÕ PM 8:37</DIV>
<DIV><B>receive:</B> " "<haifeng_q@foxmail.com>; "lldb-dev"<lldb-dev@lists.llvm.org>; <WBR></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">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>