Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 bindings and get virtual page API #3

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

masthoon
Copy link
Contributor

Hi,

This PR adds Python 3 bindings (tested on Python 3.6 64 bits ; require some modification for 3.8) and some new API:

  • GetDirectoryTableBase
  • TranslateVirtualToPhysical
  • GetVirtualPage

WIP: Python38, auto tests of Python bindings, appveyor+travis build.

src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/python/CMakeLists.txt Outdated Show resolved Hide resolved
src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/python/python-kdmp.h Outdated Show resolved Hide resolved
Copy link
Owner

@0vercl0k 0vercl0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I dropped a few comments

src/python/CMakeLists.txt Outdated Show resolved Hide resolved
@masthoon
Copy link
Contributor Author

masthoon commented Jul 21, 2020

YO
Ok it has been tested for py36/37/38 on Windows but the AppVeyor and Travis integration only use Python 3.6 to make it easier. Small python test have been integrated to --run-tests (see Python tests: All good!).

No issue with AppVeyor build.
Travis doesn't seem to have 32 bits Python installed by default, so the py3 bindings won't compile on X86 build:
Python 3.6 development library not found. Also I didn't implement the tests on it builder.py

Copy link
Owner

@0vercl0k 0vercl0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right did another round of comments - it's pretty cool. I need to try to make it work on my laptop now, let's see how this goes!

src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/lib/kdmp-parser.cc Show resolved Hide resolved
src/lib/kdmp-parser.cc Outdated Show resolved Hide resolved
src/lib/kdmp-parser.h Outdated Show resolved Hide resolved
src/lib/kdmp-parser.h Outdated Show resolved Hide resolved
builder.py Outdated Show resolved Hide resolved
builder.py Outdated Show resolved Hide resolved
builder.py Outdated Show resolved Hide resolved
builder.py Outdated Show resolved Hide resolved
src/lib/kdmp-parser.cc Show resolved Hide resolved
@0vercl0k 0vercl0k mentioned this pull request Jul 26, 2020
0vercl0k added a commit that referenced this pull request Jul 26, 2020
This PR separates the testing into a CMake target to allow #3 to work properly with various flavor of Python for the extension.
On top of that, it moves off the Linux CI to Github actions (Windows will follow).
@masthoon
Copy link
Contributor Author

Most comments fixed.
Only missing 32 bits Python tests on Linux (how to install py32 and debug libs?).

Copy link
Owner

@0vercl0k 0vercl0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool - well I guess we can leave out Linux 32bits testing as I'm not sure how to handle it; sounds like both CMake and Python are making this very tedious.

Might also be worth to update the README?

Cheers

src/lib/kdmp-parser.cc Show resolved Hide resolved
src/python/CMakeLists.txt Show resolved Hide resolved
src/python/python-kdmp.cc Show resolved Hide resolved
src/tests/tests.py Show resolved Hide resolved
@masthoon masthoon force-pushed the master branch 4 times, most recently from f2bd326 to 8798e6d Compare August 10, 2020 08:50
@masthoon
Copy link
Contributor Author

masthoon commented Aug 10, 2020

So I squashed all the commits into 1.
I added GetBugCheckParameters API to retrieve the bugcheck code and parameters.

Regarding the automated tests on Github:

Please run clang-format if someday you accept the PR.
Let me know if you need more changes.

@0vercl0k 0vercl0k merged commit 195f2b0 into 0vercl0k:master Aug 10, 2020
@0vercl0k
Copy link
Owner

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants