Git Product home page Git Product logo

effortless-hsdis's Introduction

Effortless hsdis

The repository provides an effortless way to build hsdis -- the hotspot disassembly library.

Usage

git clone https://github.com/qwwdfsad/effortless-hsdis
cd effortless-hsdis  
cmake -B build . && cmake --build build --config Release  

It will print something like

...  
[100%] Linking C shared library hsdis-aarch64.dylib  
Path to hsdis: /Users/qwwdfsad/workspace/effortless-hsdis/build/hsdis-aarch64.dylib  
[100%] Built target hsdis  

and you are good to go.

You'll need CMake, git and any CXX compiler on your machine, no other dependencies are required. build-essentials will do.

How does it work and where are the sources

The project provides a CmakeLists.txt build file with no other third-party sources.

It checks out hsdis sources from the OpenJDK repository (right now -- OpenJDK 21 release tag)
and Capstone disasambler, builds one against the other and prints
the path to the resulting hsdis that you can later put into the corresponding $JAVA_HOME/lib/server/, /usr/lib on Linux or just add it to the LD_LIBRARY_PATH.

The cool part -- this repo controls no sources and takes it from the official repositories, thus relieving us from verifying that the sources/binaries are the original ones, as well as updating them manually.

Why can't you install hsdis for my Java

A few reasons:

  • It's never a good idea to mess with the build environment outside of the confined build directory
  • It's awkward to figure out what Java is on the machine. There is $JAVA_HOME, there are a multitude of versions nearby, and also a bunch of them come from SDKMAN in its own designated path.

Adding hsdis to /usr/lib on Linux or exporting it with DYLD_LIBRARY_PATH on OS X via .zshrc should do the trick, but it's up you, you'll figure this out.

I want even more automated installation

OS X

You can use hsdis formula:

brew tap qwwdfsad/tap
brew install hsdis

Note that you'll still have to copy it to $JAVA_HOME or to export LYDB_LIBRARY_PATH. The installer will hint you on that.

Everything else (Linux probably)

Please wait till I figure out the .deb package I guess.

I don't want to build it at all

You can download hsdis from internet strangers the various community builds. I was looking up to chriswhocodes.com/hsdis and builds.shipilev.net/hsdis. Be sure to read a disclaimer to these builds though.

Does it work on Windows

I don't know. It should but I never bothered checking. If there is anybody on Windows and it doesn't work (or works!), let me know and I'll add it to the README or fix the build.

effortless-hsdis's People

Contributors

qwwdfsad avatar

Stargazers

Filipp Zhinkin avatar Evgeniy Moiseenko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.