Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

rednaxelafx commented Jul 3, 2011

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

rednaxelafx commented Nov 27, 2012

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

rednaxelafx commented Nov 27, 2012

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

rednaxelafx commented Nov 27, 2012

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