Skip to content

Instantly share code, notes, and snippets.

@rednaxelafx
Created November 12, 2010 03:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rednaxelafx/673705 to your computer and use it in GitHub Desktop.
Save rednaxelafx/673705 to your computer and use it in GitHub Desktop.
A quick-and-dirty patch to build hsdis (http://hg.openjdk.java.net/jdk7/hotspot/hotspot/file/c18cbe5936b8/src/share/tools/hsdis/) on 32-bit Ubuntu 10.04. Do `make ARCH=i386 all` on Ubuntu 64-bit to build hsdis-i386
diff -rupN original/hsdis.c hsdis.c
--- original/hsdis.c 2010-11-12 11:39:59.617873967 +0800
+++ hsdis.c 2010-11-12 11:42:00.566353179 +0800
@@ -29,7 +29,11 @@
#include "hsdis.h"
-#include <sysdep.h>
+#if 0
+ #include <sysdep.h>
+#else
+ #include <errno.h>
+#endif
#include <libiberty.h>
#include <bfd.h>
#include <dis-asm.h>
@rednaxelafx
Copy link
Author

Note that there's a bug related to this file after HotSpot's include model changed: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7023229

@rednaxelafx
Copy link
Author

To build hsdis for i386 on 64-bit Ubuntu, do

make ARCH=i386 all

without ARCH=i386 it'll only build the 64-bit version (which should be a bug in the config/make files)

@rednaxelafx
Copy link
Author

To build hsdis for i386 on Ubuntu 12.04/AMD64, do

make ARCH=i386 all

otherwise make all will only build hsdis for AMD64

@rednaxelafx
Copy link
Author

To build hsdis for i386 on Ubuntu 12.04/AMD64, do

make ARCH=i386 all

otherwise make all will only build hsdis for amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment