similar to: C to LLVM IR in python

Displaying 20 results from an estimated 30000 matches similar to: "C to LLVM IR in python"

2018 Jan 01
0
Is there a python binding, or any other script binding, that has access to individual instructions?
Hi, On 1/1/2018 07:26, Yuri via llvm-dev wrote: > I was thinking to make a simple code analysis tool to, for example, > find all system calls that have unchecked return codes, but I can't > find a binding for any scripting language. And I am averse to writing > this in C++. One possible choice would be llvmcpy -- Python bindings used by the rev.ng (https://rev.ng/) project:
2018 Jan 01
5
Is there a python binding, or any other script binding, that has access to individual instructions?
There is llvmlite http://llvmlite.readthedocs.io/en/latest/ , but it doesn't seem to support reading individual instructions, based on these docs. I was thinking to make a simple code analysis tool to, for example, find all system calls that have unchecked return codes, but I can't find a binding for any scripting language. And I am averse to writing this in C++. Thanks, Yuri
2017 Jan 12
2
llvmcpy: yet another Python binding for LLVM
Hi, I wrote yet another [1,2] Python binding for LLVM! I'm doing this because llvmlite has some serious limitations: 1) it cannot parse an existing IR, only create new modules [3], 2) it keeps its own representation of the IR (which is less memory efficient than the LLVM one), and 3) each llvmlite version supports a single LLVM version. Considering that my need is to load modules of hundreds
2017 Oct 31
2
A query language for LLVM IR (XPath)
As much as I'm not a fan of most XML things, this application of XPath is *inspired*. This would be a great testing/query tool for tests. It would also be a great way to prototype passes. Looking forward to seeing something like this in llvm/tools/ ! Cheers > On 1 Nov 2017, at 04:00, Sean Silva via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > This is so cool! I once
2018 Jan 04
0
LLVM IR Debugger
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,
2017 Oct 29
2
A query language for LLVM IR (XPath)
Hi, sometimes when dealing with LLVM IR getting to a desired point of the code is a bit cumbersome, in particular if you're instrumenting existing code. A lot of nested loops and if checks. Maybe all of this could be avoided by employing a query language. Since an LLVM module can be seen as a sort of tree with attributes, I think that reusing an existing query language for XML would be
2018 Jan 04
2
LLVM IR Debugger
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 interfaces with gdb and lldb while
2018 Jan 04
3
LLVM IR Debugger
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
2018 Jan 01
0
Is there a python binding, or any other script binding, that has access to individual instructions?
Hi Yuri, When you say code analysis, do you mean checking from source code itself, the intermediate representation, the assembly instructions or the binary? Brenda On Mon, Jan 1, 2018 at 1:26 AM, Yuri via llvm-dev <llvm-dev at lists.llvm.org> wrote: > There is llvmlite http://llvmlite.readthedocs.io/en/latest/ , but it > doesn't seem to support reading individual instructions,
2018 Jan 04
0
LLVM IR Debugger
On 4 January 2018 at 07:11, Brenda So via llvm-dev <llvm-dev at lists.llvm.org> wrote: > interesting ... just curious, why did they delete "-debug-ir" to begin with ? The metadata describing the information debuggers need (line numbers, variable locations and so on) was evolving rapidly at the time I think. The -debug-ir pass was lagging behind I think, and rarely used as far
2018 Apr 02
1
Custom Binary Format Challenges
The bitcode is only a representation of the IR, which is in SSA form. And SSA form assumes an infinite amount of registers, which is not offered by x86. When bitcode gets assembled/compiled to machine language, it breaks down the SSA form into non-SSA format. Personally I don't know how to use bitcode language to achieve what you want to do. The closest thing I can think of is the llvm-MC
2018 Apr 02
0
Custom Binary Format Challenges
If you can write what you want to output in C with asm statements, clang can show you what the IR should look like. On Mon, Apr 2, 2018 at 7:35 AM, Kenneth Adam Miller via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Program counter - EIP, RIP for x86/64. I need to obtain it and pass it as > an argument to the function that calculates an ordinal from it. > > I think that
2018 Apr 01
2
Custom Binary Format Challenges
Program counter - EIP, RIP for x86/64. I need to obtain it and pass it as an argument to the function that calculates an ordinal from it. I think that there must be some way to use the bitcode language to place byte values at a designated offset. Or use the command line to specify the section and offset for the data. On Sun, Apr 1, 2018 at 6:00 PM, Brenda So <sogun3 at gmail.com> wrote:
2018 Apr 01
0
Custom Binary Format Challenges
Hi Kenneth, Can you elaborate what you mean by instruction pointer value? Like the actual instruction with opcode and operands? With the sample code that I showed you, the instrucrtion pointer in the innermost for loop will have access to the following functions: http://llvm.org/doxygen/classllvm_1_1Instruction.html Alternatively, you can use the dump() operation to dump the instructions out.
2018 Apr 16
0
Question concerning llvm::BlockAddress class
On Mon, Apr 16, 2018 at 04:14:03PM -0400, Brenda So via llvm-dev wrote: > Hi all, > > I have a question concerning block address class in LLVM. I am currently > working on a project where I need to obtain and manipulate basic block virtual > addresses. I was searching the web and found the llvm::BlockAddress class ( > http://llvm.org/doxygen/classllvm_1_1BlockAddress.html). With
2018 Apr 01
2
Custom Binary Format Challenges
Thank you so much! What about discovering the instruction pointer value? Also, does anybody know how to embed an artifact as a resource in a binary? I'd like to have two text sections, and have one copied in from another binary. On Sun, Apr 1, 2018 at 2:15 PM, Brenda So <sogun3 at gmail.com> wrote: > Hi, > > You can write it as if you are writing an optimization pass: >
2009 Apr 02
2
Method to permit ssh while denying sftp
Is there a way to permit ssh sessions while denying sftp with openssh 3.8? In openssh 4.4+ this is possible using the Match directive with Force Command but I don't know how to configure this in older versions. Thanks in advance for any guidance. Brenda
2006 Dec 20
1
Concerning IP over ATM & IP over Ethernet.
Hi there.I''m Brenda from the Australia,I wanna work on a project relating to VOIP QoS.I wanna evaluate IP over ATM against IP over Ethernet on the following parameters relating to voice and video traffic; bandwidth consumption packet loss packet delay(latency) jitter traffic thoroughput Is this project feasible?Can I use NS to simulate the models?I hope you reply.Thanks. Best regards.
2018 Apr 16
2
Question concerning llvm::BlockAddress class
Hi all, I have a question concerning block address class in LLVM. I am currently working on a project where I need to obtain and manipulate basic block virtual addresses. I was searching the web and found the llvm::BlockAddress class (http://llvm.org/doxygen/classllvm_1_1BlockAddress.html). With this class I was able to obtain a printout like this: i8* blockaddress(@func_name, %bb_label) How do
2018 Mar 15
1
[GSoC 2018] Integrate with Z3 SMT solver to reduce false positives.
Hi all, I am a fourth year EE bachelors student who is very interested in compilers. I have taken the only compilers course offered in my school and did an independent study with my CS professor. Although I'll begin to work in a couple of months, I definitely want to pursue my interest in compiler design and optimization as a PhD in the future. I am very interested in the z3 SMT solver