How to build hsdis-amd64.dll and hsdis-i386.dll on Windows
Install Cygwin. At the Select Packages screen, add the following packages (expand the All/Devel category, Search for the package’s name, and double-click Skip in its row of the table):
gcc-coremakemingw64-i686-gcc-core(only needed forhsdis-i386.dll)mingw64-x86_64-gcc-core(only needed forhsdis-amd64.dll)
- Run the Cygwin (or Cygwin64) Terminal. This can be done using the Desktop or Start Menu icon created by the installer, and will create your Cygwin home directory (
C:\cygwin\home\usernameorC:\cygwin64\home\username, by default). Download GNU binutils to your Cygwin home directory, and extract it with:
tar xvf binutils-2.35.1.tar.xzDownload hsdis to your Cygwin home directory, and extract it with:
tar xvf jdk15u-jdk-15.0.1+9.tar.bz2Change to the hsdis directory:
cd jdk15u-jdk-15.0.1+9/src/utils/hsdisBuild
hsdis-amd64.dll:make OS=Linux MINGW=x86_64-w64-mingw32 BINUTILS=~/binutils-2.35.1or
hsdis-i386.dll:make OS=Linux MINGW=i686-w64-mingw32 BINUTILS=~/binutils-2.35.1 DLDFLAGS='-shared -static-libgcc'
Once built, the DLL can be installed by copying it from build/Linux-amd64 or build/Linux-i586 to your JRE’s bin directory.
Bonus tip: -XX:PrintAssemblyOptions= can be used to pass the same options accepted by objdump’s -M/--disassembler-options. For example, if you prefer Intel syntax to AT&T, specify -XX:PrintAssemblyOptions=intel-mnemonic.