[llvm-dev] Execute / Interpret LLVM IR Bitcode

65 views
Skip to first unread message

James Courtier-Dutton via llvm-dev

unread,
Aug 28, 2018, 4:41:07 PM8/28/18
to llvm-dev
Hi,

I know their are various tools that can take LLVM IR Bitcode and JIT
it and execute it.
Is there anything that can do the equivalent but at the LL\VM IR Bitcode level?

So, that for example, I could set some initial conditions, and then
single step through the IR Bitcode function, and pause it and print
out any of the SSA values that I wish?

Kind Regards

James
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Stefan Gränitz via llvm-dev

unread,
Aug 28, 2018, 5:48:06 PM8/28/18
to llvm...@lists.llvm.org, james....@gmail.com
Hi James

I wanted to do something like this last year and found llvm-dbas, a hack
of the LLVM assembler on GitHub. It simply adds line numbers to LLVM IR.
This way you can do the stepping, but no inspection. I remember people
asking for this from time to time, but never saw a real solution. Would
be interesting though!

https://github.com/thestr4ng3r/llvm-dbas

Cheers
Stefan

Am 28.08.18 um 22:40 schrieb James Courtier-Dutton via llvm-dev:

--
https://weliveindetail.github.io/blog/
https://cryptup.org/pub/stefan....@gmail.com

mayuyu.io via llvm-dev

unread,
Aug 28, 2018, 11:53:01 PM8/28/18
to Stefan Gränitz, llvm...@lists.llvm.org
Just saying since the backend will be doing other transforms this is not exactly what James wants. In order to achieve what he needs we need a LLVM BC interpreter which simply doesn’t exist yet, and probably will never be.

Zhang

Jacob Kreindl via llvm-dev

unread,
Sep 3, 2018, 9:08:09 AM9/3/18
to llvm...@lists.llvm.org
Hi all,

You could take a look at Sulong (1) for this. Sulong is an LLVM BC
interpreter that also supports both IR-level and source-level debugging.
The IR-level debugging feature described at (2) sounds very much like
what James wants to have. Sulong is part of GraalVM (3) which provides
builds for multiple platforms.


I apologize for not replying to the specific thread. I am working on
Sulong rather than LLVM, so I only receive this mailing list as a digest
to keep up with the latest developments of this project and usually
don't participate in any discussions here.


(1) https://github.com/graalvm/sulong

(2)
https://github.com/graalvm/sulong/blob/master/docs/DEBUGGING.md#can-i-also-debug-my-program-on-llvm-ir-level

(3) http://www.graalvm.org/


Jacob


On 08/29/2018 10:38 AM, via llvm-dev wrote:
> ------------------------------
>
> Message: 5
> Date: Wed, 29 Aug 2018 11:52:19 +0800
> From: "mayuyu.io via llvm-dev" <llvm...@lists.llvm.org>
> To: Stefan Gränitz <stefan....@gmail.com>
> Cc: llvm...@lists.llvm.org
> Subject: Re: [llvm-dev] Execute / Interpret LLVM IR Bitcode
> Message-ID: <06B22EA4-3A2B-4DE8...@mayuyu.io>
> Content-Type: text/plain; charset=utf-8

> ------------------------------

Reply all
Reply to author
Forward
0 new messages