mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-22 19:55:45 +00:00
renamed unicorn gem to unicorn-engine (#895)
* renamed gem unicorn to unicorn-engine * renamed modules to unicornengine * renamed Module Unicorn to UnicornEngine and the gem unicorn-engine to unicornengine * unicornengine -> unicorn_engine
This commit is contained in:
parent
46ae3a042e
commit
13007eb12a
|
@ -25,10 +25,10 @@ template = {
|
|||
'comment_close': '',
|
||||
},
|
||||
'ruby': {
|
||||
'header': "# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [%s_const.rb]\n\nmodule Unicorn\n",
|
||||
'header': "# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [%s_const.rb]\n\nmodule UnicornEngine\n",
|
||||
'footer': "end",
|
||||
'line_format': '\tUC_%s = %s\n',
|
||||
'out_file': './ruby/unicorn_gem/lib/unicorn/%s_const.rb',
|
||||
'out_file': './ruby/unicorn_gem/lib/unicorn_engine/%s_const.rb',
|
||||
# prefixes for constant filenames of all archs - case sensitive
|
||||
'arm.h': 'arm',
|
||||
'arm64.h': 'arm64',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Use bundle install && rake to install gem and test
|
||||
install: gen_const
|
||||
cd unicorn_gem && rake build
|
||||
cd unicorn_gem && gem install --local pkg/unicorn-1.0.0.gem
|
||||
cd unicorn_gem && gem install --local pkg/unicorn_engine-1.0.0.gem
|
||||
|
||||
gen_const:
|
||||
cd .. && python const_generator.py ruby
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'unicorn'
|
||||
require 'unicorn/arm_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/arm_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
# code to be emulated
|
||||
ARM_CODE = "\x37\x00\xa0\xe3\x03\x10\x42\xe0" # mov r0, #0x37; sub r1, r2, r3
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env ruby
|
||||
# Sample code for ARM64 of Unicorn. Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
# Ruby sample ported by Sascha Schirra <sashs82@gmail.com>
|
||||
require 'unicorn'
|
||||
require 'unicorn/arm64_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/arm64_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
# code to be emulated
|
||||
ARM64_CODE = "\xab\x01\x0f\x8b" #add x11, x13, x15
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
# Sample code for ARM of Unicorn. Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
# Ruby sample ported by Sascha Schirra <sashs82@gmail.com>
|
||||
|
||||
require 'unicorn'
|
||||
require 'unicorn/m68k_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/m68k_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
# code to be emulated
|
||||
M68K_CODE = "\x76\xed" # movq #-19, %d3
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env ruby
|
||||
# Sample code for MIPS of Unicorn. Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
# Ruby sample ported by Sascha Schirra <sashs82@gmail.com>
|
||||
require 'unicorn'
|
||||
require 'unicorn/mips_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/mips_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
# code to be emulated
|
||||
MIPS_CODE_EB = "\x34\x21\x34\x56" # ori $at, $at, 0x3456;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env ruby
|
||||
# Sample code for SPARC of Unicorn. Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
# Ruby sample ported by Sascha Schirra <sashs82@gmail.com>
|
||||
require 'unicorn'
|
||||
require 'unicorn/sparc_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/sparc_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
# code to be emulated
|
||||
SPARC_CODE = "\x86\x00\x40\x02" # add %g1, %g2, %g3;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'unicorn'
|
||||
require 'unicorn/x86_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/x86_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
X86_CODE32 = "\x41\x4a" # INC ecx; DEC edx
|
||||
X86_CODE32_LOOP = "\x41\x4a\xeb\xfe" # INC ecx; DEC edx; JMP self-loop
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'unicorn'
|
||||
require 'unicorn/x86_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/x86_const'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
F_GRANULARITY = 0x8
|
||||
F_PROT_32 = 0x4
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'unicorn'
|
||||
require 'unicorn/x86_const'
|
||||
require 'unicorn_engine'
|
||||
require 'unicorn_engine/x86_const'
|
||||
require 'weakref'
|
||||
|
||||
include Unicorn
|
||||
include UnicornEngine
|
||||
|
||||
X86_CODE32 = "\x41" # INC ecx; DEC edx
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require 'mkmf'
|
||||
|
||||
extension_name = 'unicorn'
|
||||
extension_name = 'unicorn_engine'
|
||||
|
||||
dir_config(extension_name)
|
||||
have_library('unicorn')
|
||||
|
||||
create_makefile(extension_name)
|
||||
create_makefile(extension_name)
|
||||
|
|
|
@ -23,3 +23,11 @@ typedef struct uc_x86_float80 {
|
|||
uint64_t mantissa;
|
||||
uint16_t exponent;
|
||||
} uc_x86_float80;
|
||||
|
||||
|
||||
struct hook {
|
||||
uc_hook trace;
|
||||
VALUE cb;
|
||||
VALUE ud;
|
||||
VALUE rUc;
|
||||
};
|
||||
|
|
|
@ -30,16 +30,10 @@ VALUE UcError = Qnil;
|
|||
VALUE SavedContext = Qnil;
|
||||
VALUE Hook = Qnil;
|
||||
|
||||
struct hook {
|
||||
uc_hook trace;
|
||||
VALUE cb;
|
||||
VALUE ud;
|
||||
VALUE rUc;
|
||||
};
|
||||
|
||||
void Init_unicorn() {
|
||||
rb_require("unicorn/unicorn_const");
|
||||
UnicornModule = rb_define_module("Unicorn");
|
||||
void Init_unicorn_engine() {
|
||||
rb_require("unicorn_engine/unicorn_const");
|
||||
UnicornModule = rb_define_module("UnicornEngine");
|
||||
UcError = rb_define_class_under(UnicornModule, "UcError", rb_eStandardError);
|
||||
SavedContext = rb_define_class_under(UnicornModule, "SavedContext", rb_cObject);
|
||||
Hook = rb_define_class_under(UnicornModule, "Hook", rb_cObject);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [arm64_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# ARM64 registers
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [arm_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# ARM registers
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [m68k_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# M68K registers
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [mips_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# MIPS registers
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [sparc_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# SPARC registers
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [unicorn_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
UC_API_MAJOR = 1
|
||||
|
||||
UC_API_MINOR = 0
|
|
@ -1,6 +1,6 @@
|
|||
# For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [x86_const.rb]
|
||||
|
||||
module Unicorn
|
||||
module UnicornEngine
|
||||
|
||||
# X86 registers
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# coding: utf-8
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'unicorn/version'
|
||||
require 'unicorn_engine/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "unicorn"
|
||||
spec.name = "unicorn_engine"
|
||||
spec.version = Unicorn::VERSION
|
||||
spec.authors = ["Sascha Schirra"]
|
||||
spec.email = ["sashs@scoding.de"]
|
||||
|
@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|||
spec.description = %q{Ruby binding for Unicorn-Engine <unicorn-engine.org>}
|
||||
spec.homepage = "https://unicorn-engine.org"
|
||||
|
||||
spec.files = Dir["lib/unicorn/*.rb"] + Dir["ext/unicorn.c"] + Dir["ext/unicorn.h"] + Dir["ext/types.h"] + Dir["ext/extconf.rb"]
|
||||
spec.files = Dir["lib/unicorn_engine/*.rb"] + Dir["ext/unicorn.c"] + Dir["ext/unicorn.h"] + Dir["ext/types.h"] + Dir["ext/extconf.rb"]
|
||||
spec.require_paths = ["lib","ext"]
|
||||
spec.extensions = ["ext/extconf.rb"]
|
||||
spec.add_development_dependency "bundler", "~> 1.11"
|
||||
|
|
Loading…
Reference in a new issue