[GTK] Build the Udis86 disassembler
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 20:12:01 +0000 (20:12 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 20:12:01 +0000 (20:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129679

Reviewed by Michael Saboff.

.:

* GNUmakefile.am: Add the Udis86_nosources variable.
* Source/cmake/OptionsGTK.cmake: Enable the Udis86 disassembler.

Source/JavaScriptCore:

* GNUmakefile.am: Generate the Udis86-related derived sources. Distribute the required files.
* GNUmakefile.list.am: Add the Udis86 disassembler files to the build.

Source/WTF:

* wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
GNUmakefile.am
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/GNUmakefile.list.am
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/cmake/OptionsGTK.cmake

index 1ad7a93..5dfb8e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Build the Udis86 disassembler
+        https://bugs.webkit.org/show_bug.cgi?id=129679
+
+        Reviewed by Michael Saboff.
+
+        * GNUmakefile.am: Add the Udis86_nosources variable.
+        * Source/cmake/OptionsGTK.cmake: Enable the Udis86 disassembler.
+
 2014-03-04  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK] Simplify the GObject DOM bindings API break check into one step
index aaf2797..d142b68 100644 (file)
@@ -76,6 +76,7 @@ javascriptcore_built_sources :=
 javascriptcore_built_nosources :=
 llint_nosources :=
 offlineasm_nosources :=
+udis86_nosources :=
 platform_webcore_cppflags :=
 platform_cppflags :=
 platform_built_sources :=
index 7683582..8d202e7 100644 (file)
@@ -1,3 +1,13 @@
+2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Build the Udis86 disassembler
+        https://bugs.webkit.org/show_bug.cgi?id=129679
+
+        Reviewed by Michael Saboff.
+
+        * GNUmakefile.am: Generate the Udis86-related derived sources. Distribute the required files.
+        * GNUmakefile.list.am: Add the Udis86 disassembler files to the build.
+
 2014-03-04  Andreas Kling  <akling@apple.com>
 
         Fix too-narrow assertion I added in r165054.
index 9c39968..6b59d28 100644 (file)
@@ -57,6 +57,7 @@ javascriptcore_cppflags += \
        -I$(srcdir)/Source/JavaScriptCore/debugger \
        -I$(srcdir)/Source/JavaScriptCore/dfg \
        -I$(srcdir)/Source/JavaScriptCore/disassembler \
+       -I$(srcdir)/Source/JavaScriptCore/disassembler/udis86 \
        -I$(srcdir)/Source/JavaScriptCore/ftl \
        -I$(srcdir)/Source/JavaScriptCore/heap \
        -I$(srcdir)/Source/JavaScriptCore/inspector \
@@ -127,6 +128,10 @@ DerivedSources/JavaScriptCore/JSCBuiltins.h: DerivedSources/JavaScriptCore/JSCBu
 DerivedSources/JavaScriptCore/JSCBuiltins.cpp: $(srcdir)/Source/JavaScriptCore/generate-js-builtins $(javascriptcore_builtins_js_nosources)
        $(AM_V_GEN)$(PYTHON) $^ $@
 
+DerivedSources/JavaScriptCore/udis86_itab.h: DerivedSources/JavaScriptCore/udis86_itab.c
+DerivedSources/JavaScriptCore/udis86_itab.c: $(udis86_nosources)
+       $(AM_V_GEN)$(PYTHON) $(srcdir)/Source/JavaScriptCore/disassembler/udis86/itab.py --outputDir DerivedSources/JavaScriptCore $(srcdir)/Source/JavaScriptCore/disassembler/udis86/optable.xml
+
 $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_OBJECTS): DerivedSources/JavaScriptCore/LLIntAssembly.h
 
 jsc: $(javascriptcore_built_nosources) Programs/jsc$(EXEEXT)
@@ -230,7 +235,8 @@ EXTRA_DIST += \
        Source/JavaScriptCore/THANKS \
        $(javascriptcore_builtins_js_nosources) \
        $(llint_nosources) \
-       $(offlineasm_nosources)
+       $(offlineasm_nosources) \
+       $(udis86_nosources)
 
 CLEANFILES += \
        $(javascriptcore_built_nosources) \
index 0e918be..719bf55 100644 (file)
@@ -37,7 +37,9 @@ javascriptcore_built_nosources += \
        DerivedSources/JavaScriptCore/Bytecodes.h \
        DerivedSources/JavaScriptCore/InitBytecodes.asm \
        DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h \
-       DerivedSources/JavaScriptCore/LLIntAssembly.h
+       DerivedSources/JavaScriptCore/LLIntAssembly.h \
+       DerivedSources/JavaScriptCore/udis86_itab.c \
+       DerivedSources/JavaScriptCore/udis86_itab.h
 
 javascriptcore_builtins_js_nosources += \
        $(wildcard $(srcdir)/Source/JavaScriptCore/builtins/*.js)
@@ -463,7 +465,22 @@ javascriptcore_sources += \
        Source/JavaScriptCore/disassembler/Disassembler.h \
        Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp \
        Source/JavaScriptCore/disassembler/LLVMDisassembler.h \
+       Source/JavaScriptCore/disassembler/UDis86Disassembler.cpp \
+       Source/JavaScriptCore/disassembler/UDis86Disassembler.h \
        Source/JavaScriptCore/disassembler/X86Disassembler.cpp \
+       Source/JavaScriptCore/disassembler/udis86/udis86.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86.h \
+       Source/JavaScriptCore/disassembler/udis86/udis86_decode.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_decode.h \
+       Source/JavaScriptCore/disassembler/udis86/udis86_extern.h \
+       Source/JavaScriptCore/disassembler/udis86/udis86_input.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_input.h \
+       Source/JavaScriptCore/disassembler/udis86/udis86_itab_holder.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_syn.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_syn.h \
+       Source/JavaScriptCore/disassembler/udis86/udis86_syn-att.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_syn-intel.c \
+       Source/JavaScriptCore/disassembler/udis86/udis86_types.h \
        Source/JavaScriptCore/ftl/FTLAbbreviatedTypes.h \
        Source/JavaScriptCore/ftl/FTLAbbreviations.h \
        Source/JavaScriptCore/ftl/FTLAbstractHeap.cpp \
@@ -1326,6 +1343,12 @@ offlineasm_nosources += \
        Source/JavaScriptCore/offlineasm/transform.rb \
        Source/JavaScriptCore/offlineasm/x86.rb
 
+udis86_nosources += \
+       Source/JavaScriptCore/disassembler/udis86/itab.py \
+       Source/JavaScriptCore/disassembler/udis86/optable.xml \
+       Source/JavaScriptCore/disassembler/udis86/ud_opcode.py \
+       Source/JavaScriptCore/disassembler/udis86/ud_optable.py
+
 # minidom
 Programs_minidom_SOURCES = \
        Source/JavaScriptCore/API/tests/JSNode.c \
index c9d4025..3d30ed0 100644 (file)
@@ -1,3 +1,12 @@
+2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Build the Udis86 disassembler
+        https://bugs.webkit.org/show_bug.cgi?id=129679
+
+        Reviewed by Michael Saboff.
+
+        * wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux.
+
 2014-03-02  Jaehun Lim  <ljaehun.lim@samsung.com>
 
         [EFL] Remove m_initEfl from RunLoop.
index fbf9597..1068851 100644 (file)
 /* If possible, try to enable a disassembler. This is optional. We proceed in two
    steps: first we try to find some disassembler that we can use, and then we
    decide if the high-level disassembler API can be enabled. */
-#if !defined(WTF_USE_UDIS86) && ENABLE(JIT) && ((OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)) || (PLATFORM(EFL) && OS(LINUX))) \
+#if !defined(WTF_USE_UDIS86) && ENABLE(JIT) && ((OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)) || (OS(LINUX) && (PLATFORM(EFL) || PLATFORM(GTK)))) \
     && (CPU(X86) || CPU(X86_64))
 #define WTF_USE_UDIS86 1
 #endif
index cd2199a..69440df 100644 (file)
@@ -123,6 +123,7 @@ set(includedir "${prefix}/include")
 set(VERSION ${PROJECT_VERSION})
 
 set(WTF_USE_SOUP 1)
+set(WTF_USE_UDIS86 1)
 
 set(WTF_OUTPUT_NAME WTFGTK)
 set(JavaScriptCore_OUTPUT_NAME javascriptcoregtk-${WEBKITGTK_API_VERSION})