Commit Graph

14 Commits

Author SHA1 Message Date
Bill Wendling
0c25b8f07e We're in 3.4 land now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 20:31:28 +00:00
Gregory Szorc
fdddf77171 [python] Add markup option to disassembler
Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01 21:57:30 +00:00
Anders Waldenborg
17cfe87c39 [python] fix get_library()
Before this fix, the LLVM Python bindings on SVN trunk always fail with:
	Exception: LLVM shared library not found!
since it's still looking for a library named "LLVM-3.1svn".

Besides updating the LLVM version in the library name,
this patch also changes llvm.get_library() to make it possible to run
the unit tests without installing the LLVM shared library into a
default linker search path.

e.g. after this patch, running the llvm/python unit tests with:
LD_LIBRARY_PATH=../build/Debug+Asserts/lib nosetests -v bindings/python/llvm/tests/
would work on Linux.

Patch from Scott Tsai (with some minor modifications)

Patch also acked by Gregory Szorc



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168390 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-20 22:27:55 +00:00
Anders Waldenborg
e3295cc5be [python] Add negative MemoryBuffer testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153248 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-22 11:23:52 +00:00
Anders Waldenborg
a8d873e178 [python] Add some paths where to find test binary
Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-21 08:34:58 +00:00
Anders Waldenborg
3595954130 [python] Mark get_test_binary as not being a test
get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153173 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-21 08:18:19 +00:00
Gregory Szorc
92a3e9d63a [llvm.py] Implement disassembler interface
It doesn't currently support the op info and symbol lookup callbacks,
but it is better than nothing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152527 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-11 02:32:56 +00:00
Gregory Szorc
309a2c4e3b Revert "[llvm.py] Implement interface to enhanced disassembler"
Chris Lattner says the edis interface is going away. It doesn't make
sense to land something that will go away in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 21:44:03 +00:00
Gregory Szorc
0b3aae906f [llvm.py] Implement interface to enhanced disassembler
This requires a C++ change to EDDisassembler's ctor to function properly
(the llvm::InitializeAll* functions aren't being called currently and
there is no way to call them from Python).

Code is partially tested and works well enough for initial commit. There
are probably many small bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152506 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 21:05:05 +00:00
Gregory Szorc
d3ac784fbb [llvm.py] Make LLVMObject.__del__ work if called during __init__
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152505 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 21:01:14 +00:00
Gregory Szorc
b7487d4edc [llvm.py] Define enumerations from Core.h; add OpCode class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 05:50:56 +00:00
Gregory Szorc
61e22cd85c [llvm.py] Implement interface to object files
It is now possible to load object files and scan over sections, symbols,
and relocations! Includes test code with partial coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 04:41:24 +00:00
Gregory Szorc
07c32218f4 [llvm.py] Make ObjectFile destructor work
Previous code had a double free in MemoryBuffer. The tests now pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152422 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-09 18:56:33 +00:00
Gregory Szorc
5ae04279e0 [llvm.py] Initial skeleton for Python LLVM bindings
This contains a semi-functional skeleton for the implementation of the
LLVM bindings for Python.

The API for the Object.h interface is roughly designed but not
implemented. MemoryBufferRef is implemented and actually appears to
work!

The ObjectFile unit test fails with a segmentation fault because the
LLVM library isn't being properly initialized. The build system doesn't
know about this code yet, so no alerts should fire.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152397 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-09 09:07:35 +00:00