Hi I am looking at open projects that LLVM want to implement and it seems to be a suggestion to write an LLVM IR level debugger. Is there any existing LLVM projects out there that already does such a thing? If not, I would like to try implementing one myself. By debugger, I think it means something like gdb, where you can insert breakpoints, run code and observe layout of registers and memory at certain periods of time. If anyone has suggestions as to how this IR debugger should work please let me know. Thanks! Brenda -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180103/9418392f/attachment.html>
You can attach debug info to the Llvm module about LLVM IR, at which point one can throw the executable into any debugger and get llvm level debugging. I've started a patch to revive this feature (DebugIR pass). I've been sidetracked the past month, but I'll come back to it soon :) https://reviews.llvm.org/D40778 Cheers, Siddharth On Thu 4 Jan, 2018, 09:23 Brenda So via llvm-dev, <llvm-dev at lists.llvm.org> wrote:> Hi > > I am looking at open projects that LLVM want to implement and it seems to > be a suggestion to write an LLVM IR level debugger. Is there any existing > LLVM projects out there that already does such a thing? If not, I would > like to try implementing one myself. > > By debugger, I think it means something like gdb, where you can insert > breakpoints, run code and observe layout of registers and memory at certain > periods of time. > > If anyone has suggestions as to how this IR debugger should work please > let me know. > > Thanks! > Brenda > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Sending this from my phone, please excuse any typos! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180104/fb883729/attachment.html>
interesting ... just curious, why did they delete "-debug-ir" to begin with ? Also, it's extremely interesting that gdb and lldb can be used to debug LLVM IR. How does your code work (on a high level)? A high level explanation will help me understand what you've done better.>From first glance, my idea is slight different because your code interfaceswith gdb and lldb while i'm more interested in making the debugger itself (sort of an extended interpreter). Yours, Brenda On Thu, Jan 4, 2018 at 12:32 AM, Siddharth Bhat <siddu.druid at gmail.com> wrote:> You can attach debug info to the Llvm module about LLVM IR, at which point > one can throw the executable into any debugger and get llvm level debugging. > > I've started a patch to revive this feature (DebugIR pass). I've been > sidetracked the past month, but I'll come back to it soon :) > https://reviews.llvm.org/D40778 > > Cheers, > Siddharth > > On Thu 4 Jan, 2018, 09:23 Brenda So via llvm-dev, <llvm-dev at lists.llvm.org> > wrote: > >> Hi >> >> I am looking at open projects that LLVM want to implement and it seems to >> be a suggestion to write an LLVM IR level debugger. Is there any existing >> LLVM projects out there that already does such a thing? If not, I would >> like to try implementing one myself. >> >> By debugger, I think it means something like gdb, where you can insert >> breakpoints, run code and observe layout of registers and memory at certain >> periods of time. >> >> If anyone has suggestions as to how this IR debugger should work please >> let me know. >> >> Thanks! >> Brenda >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > -- > Sending this from my phone, please excuse any typos! >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180104/dcec8028/attachment.html>
Hi Brenda You may want to have a look here: https://github.com/thestr4ng3r/llvm-dbas The project can be used to re-assemble IR modules and add debug information on the fly. It's based on the LLVM Assembler as it brings most of the infrastructure already. I ported it to LLVM 4.0 last year and it worked well for my limited purpose. Not sure if it's suitable for adding symbol information for inspection though. Hope that helps somehow. Best Stefan Am 04.01.18 um 04:53 schrieb Brenda So via llvm-dev:> Hi > > I am looking at open projects that LLVM want to implement and it seems > to be a suggestion to write an LLVM IR level debugger. Is there any > existing LLVM projects out there that already does such a thing? If > not, I would like to try implementing one myself. > > By debugger, I think it means something like gdb, where you can insert > breakpoints, run code and observe layout of registers and memory at > certain periods of time. > > If anyone has suggestions as to how this IR debugger should work > please let me know. > > Thanks! > Brenda > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- https://weliveindetail.github.io/blog/ https://cryptup.org/pub/stefan.graenitz at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180115/abc6168b/attachment.html>