{"id":15069494,"url":"https://github.com/liuzhengyang/hsdis","last_synced_at":"2025-08-02T12:36:26.132Z","repository":{"id":37493373,"uuid":"92258627","full_name":"liuzhengyang/hsdis","owner":"liuzhengyang","description":"hotspot disassembler hsdis","archived":false,"fork":false,"pushed_at":"2023-02-13T11:33:16.000Z","size":37078,"stargazers_count":140,"open_issues_count":3,"forks_count":53,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-08T04:32:02.694Z","etag":null,"topics":["disassembler","hotspot","hsdis","java","openjdk"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liuzhengyang.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-24T06:37:11.000Z","updated_at":"2024-12-03T13:55:14.000Z","dependencies_parsed_at":"2022-08-23T16:20:29.989Z","dependency_job_id":"18f59b4f-23aa-4fbc-b564-c6092dc048eb","html_url":"https://github.com/liuzhengyang/hsdis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzhengyang%2Fhsdis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzhengyang%2Fhsdis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzhengyang%2Fhsdis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzhengyang%2Fhsdis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuzhengyang","download_url":"https://codeload.github.com/liuzhengyang/hsdis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230507051,"owners_count":18236944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disassembler","hotspot","hsdis","java","openjdk"],"created_at":"2024-09-25T01:42:51.401Z","updated_at":"2024-12-19T22:07:52.219Z","avatar_url":"https://github.com/liuzhengyang.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.\nDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  \nThis code is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License version 2 only, as\npublished by the Free Software Foundation.\n  \nThis code is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\nversion 2 for more details (a copy is included in the LICENSE file that\naccompanied this code).\n \nYou should have received a copy of the GNU General Public License version\n2 along with this work; if not, write to the Free Software Foundation,\nInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n  \nPlease contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\nor visit www.oracle.com if you need additional information or have any\nquestions.\n\n________________________________________________________________________\n\n'hsdis':  A HotSpot plugin for disassembling dynamically generated code.\n\nThe files in this directory (Makefile, hsdis.[ch], hsdis-demo.c)\nare built independently of the HotSpot JVM.\n\nTo use the plugin with a JVM, you need a new version that can load it.\nIf the product mode of your JVM does not accept -XX:+PrintAssembly,\nyou do not have a version that is new enough.\n\n* Building\n\nTo build this project you a copy of GNU binutils to build against.  It\nis known to work with binutils 2.17 and binutils 2.19.1.  Download a\ncopy of the software from http://directory.fsf.org/project/binutils or\none of it's mirrors.  Builds targetting windows should use at least\n2.19 and currently requires the use of a cross compiler.\n\nBinutils should be configured with the '--disable-nls' flag to disable\nNative Language Support, otherwise you might get an \"undefined\nreference to `libintl_gettext'\" if you try to load hsdis.so on systems\nwhich don't have NLS by default.  It also avoids build problems on\nother configurations that don't include the full NLS support.\n\nThe makefile looks for the sources in build/binutils or you can\nspecify it's location to the makefile using BINUTILS=path.  It will\nconfigure binutils and build it first and then build and link the\ndisasembly adapter.  Make all will build the default target for your\nplatform.  If you platform support both 32 and 64 simultaneously then\n\"make both\" will build them both at once.  \"make all64\" will\nexplicitly build the 64 bit version.  By default this will build the\ndisassembler library only.  If you build demo it will build a demo\nprogram that attempts to exercise the library.\n\nWindows\n\nIn theory this should be buildable on Windows but getting a working\nGNU build environment on Windows has proven difficult.  MINGW should\nbe able to do it but at the time of this writing I was unable to get\nthis working.  Instead you can use the mingw cross compiler on linux\nto produce the windows binaries.  For 32-bit windows you can install\nmingw32 using your package manager and it will be added to your path\nautomatically.  For 64-bit you need to download the 64 bit mingw from\nhttp://sourceforge.net/projects/mingw-w64.  Grab a copy of the\ncomplete toolchain and unpack it somewhere.  Put the bin directory of\nthe toolchain in your path.  The mingw installs contain cross compile\nversions of gcc that are named with a prefix to indicate what they are\ntargetting and you must tell the Makefile which one to use.  This\nshould either be i586-mingw32msvc or x86_64-pc-mingw32 depending on\nwhich on you are targetting and there should be a version of gcc in\nyour path named i586-mingw32msvc-gcc or x86_64-pc-mingw32-gcc.  Tell\nthe makefile what prefix to use to find the mingw tools by using\nMINGW=.  For example:\n\nmake MINGW=i586-mingw32msvc BINTUILS=build/binutils-2.19.1\n\nwill build the Win32 cross compiled version of hsdis based on 2.19.1.\n\n* Installing\n\nProducts are named like build/$OS-$LIBARCH/hsdis-$LIBARCH.so.  You can\ninstall them on your LD_LIBRARY_PATH, or inside of your JRE/JDK.  The\nsearch path in the JVM is:\n\n1. \u003chome\u003e/jre/lib/\u003carch\u003e/\u003cvm\u003e/libhsdis-\u003carch\u003e.so\n2. \u003chome\u003e/jre/lib/\u003carch\u003e/\u003cvm\u003e/hsdis-\u003carch\u003e.so\n3. \u003chome\u003e/jre/lib/\u003carch\u003e/hsdis-\u003carch\u003e.so\n4. hsdis-\u003carch\u003e.so  (using LD_LIBRARY_PATH)\n\nNote that there's a bug in hotspot versions prior to hs22 that causes\nsteps 2 and 3 to fail when used with JDK7.\n\nNow test:\n\n  export LD_LIBRARY_PATH .../hsdis/build/$OS-$LIBARCH:$LD_LIBRARY_PATH\n  dargs='-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly'\n  dargs=$dargs' -XX:PrintAssemblyOptions=hsdis-print-bytes'\n  java $dargs -Xbatch CompileCommand=print,*String.hashCode HelloWorld\n\nIf the product mode of the JVM does not accept -XX:+PrintAssembly,\nyou do not have a version new enough to use the hsdis plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuzhengyang%2Fhsdis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuzhengyang%2Fhsdis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuzhengyang%2Fhsdis/lists"}