[lldb-dev] reply: reply: lldb debug jit-compiled code with llvm on windows
haifeng_q via lldb-dev
lldb-dev at lists.llvm.org
Mon Nov 30 02:18:44 PST 2015
Question 1:
On the windows, I use the code implements a function (see debug_target.cpp) of JIT (see debug_target_process.cpp), but when generating debug information, no production .symtab section for information that leads LLDB get JIT debugging information .symtab failure , and then set a breakpoint to fail.
LLDB command: lldb_result.txt
JIT compilation results: debug_target.ll
Question 2:
How JIT debugging supported on Linux?
thanks!
------------------ The original message ------------------
From: "Zachary Turner";<zturner at google.com>;
Data: 2015年11月21日 AM 0:10
Receive: "Tamas Berghammer"<tberghammer at google.com>; " "<haifeng_q at foxmail.com>; "lldb-dev"<lldb-dev at lists.llvm.org>;
Title: Re: [lldb-dev] reply: lldb debug jit-compiled code with llvm on windows
Can you also try clang-cl and see if it works?
On Fri, Nov 20, 2015 at 3:02 AM Tamas Berghammer via lldb-dev <lldb-dev at lists.llvm.org> wrote:
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.
On Fri, Nov 20, 2015 at 8:56 AM haifeng_q <haifeng_q at foxmail.com> wrote:
My analysis of the code, the reasons are:
Since the debugging process is MSVC compiler, there is no DWARF debugging information. So lldb get __jit_debug_register_code and __it_debug_descriptor symbol debugging process fails, and __jit_debug_register_code not support MSVC.
I do not know whether correct?
------------------ original message------------------
From:"Tamas Berghammer";tberghammer at google.com;
Date:2015年11月19日 PM 8:37
receive: " "<haifeng_q at foxmail.com>; "lldb-dev"<lldb-dev at lists.llvm.org>;
Subject: Re: [lldb-dev] lldb debug jit-compiled code with llvm on windows
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.
Tamas
On Thu, Nov 19, 2015 at 8:40 AM haifeng_q via lldb-dev <lldb-dev at lists.llvm.org> wrote:
hi,
process A generate function Func1 code with llvm jit compiler, and calls Func1. modeled on "Kaleidoscope: Adding Debug Information" add debug information. how to use LLDB to attach process A to debug this function, add a breakpoint in the function?
thanks!
_______________________________________________
lldb-dev mailing list
lldb-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
_______________________________________________
lldb-dev mailing list
lldb-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_target.cpp
Type: application/octet-stream
Size: 143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_target.ll
Type: application/octet-stream
Size: 2081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_target_process.cpp
Type: application/octet-stream
Size: 12350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb_result.txt
Type: application/octet-stream
Size: 6620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb_stack.txt
Type: application/octet-stream
Size: 1179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151130/4561228b/attachment-0009.obj>
More information about the lldb-dev
mailing list