Module: Ragweed
- Included in:
- Debugger32, Debuggerosx, Debuggertux, Process, Wraposx::ThreadContext
- Defined in:
- lib/ragweed/rasm.rb,
lib/ragweed.rb,
lib/ragweed/wrap32.rb,
lib/ragweed/wraposx.rb,
lib/ragweed/wraptux.rb,
lib/ragweed/debuggerosx.rb,
lib/ragweed/debuggertux.rb,
lib/ragweed/wrap32/winx.rb,
lib/ragweed/wrap32/device.rb,
lib/ragweed/wrap32/wrap32.rb,
lib/ragweed/wraposx/wraposx.rb,
lib/ragweed/wraptux/threads.rb,
lib/ragweed/wraptux/wraptux.rb,
lib/ragweed/wraposx/constants.rb,
lib/ragweed/wraptux/constants.rb,
lib/ragweed/wraposx/region_info.rb,
lib/ragweed/wraposx/thread_info.rb,
lib/ragweed/wraposx/kernelerrorx.rb,
lib/ragweed/wraposx/thread_context.rb
Overview
Exception objects for kernel errors likely in Wraposx If this were a C extension I’d use #ifdef on each to only create the required ones.
Defined Under Namespace
Modules: Blocks, Rasm, Wrap32, Wraposx, Wraptux Classes: Arena, Debugger32, Debuggerosx, Debuggertux, Detour, Device, Event, Process, Ptr, Sbuf, Trampoline
Constant Summary collapse
- VERSION =
:stopdoc:
'0.1.6'- LIBPATH =
::File.(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH =
::File.dirname(LIBPATH) + ::File::SEPARATOR
Class Method Summary collapse
-
.libpath(*args) ⇒ Object
Returns the library path for the module.
-
.path(*args) ⇒ Object
Returns the lpath for the module.
-
.require_all_libs_relative_to(fname, dir = nil) ⇒ Object
Utility method used to require all files ending in .rb that lie in the directory below this file that has the same name as the filename passed in.
- .require_os_libs_relative_to(fname, dir = nil) ⇒ Object
-
.version ⇒ Object
Returns the version string for the library.
Class Method Details
.libpath(*args) ⇒ Object
Returns the library path for the module. If any arguments are given, they will be joined to the end of the libray path using File.join.
20 21 22 |
# File 'lib/ragweed.rb', line 20 def self.libpath( *args ) args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten) end |
.path(*args) ⇒ Object
Returns the lpath for the module. If any arguments are given, they will be joined to the end of the path using File.join.
28 29 30 |
# File 'lib/ragweed.rb', line 28 def self.path( *args ) args.empty? ? PATH : ::File.join(PATH, args.flatten) end |
.require_all_libs_relative_to(fname, dir = nil) ⇒ Object
Utility method used to require all files ending in .rb that lie in the directory below this file that has the same name as the filename passed in. Optionally, a specific directory name can be passed in such that the filename does not have to be equivalent to the directory.
37 38 39 40 41 42 43 44 45 |
# File 'lib/ragweed.rb', line 37 def self.require_all_libs_relative_to( fname, dir = nil ) dir ||= ::File.basename(fname, '.*') search_me = ::File.( ::File.join(::File.dirname(fname), dir, '**', '*.rb')) # Don't want to load wrapper or debugger here. Dir.glob(search_me).sort.reject{|rb| rb =~ /(wrap|debugger|rasm[^.])/}.each {|rb| require rb} # require File.dirname(File.basename(__FILE__)) + "/#{x}"d end |
.require_os_libs_relative_to(fname, dir = nil) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ragweed.rb', line 47 def self.require_os_libs_relative_to( fname, dir= nil ) dir ||= ::File.basename(fname, '.*') pkgs = "" dbg = "" case when RUBY_PLATFORM =~ /win(dows|32)/i pkgs = '32' when RUBY_PLATFORM =~ /darwin/i pkgs = 'osx' when RUBY_PLATFORM =~ /linux/i pkgs = 'tux' # when RUBY_PLATFORM =~ /java/i # XXX -TODO else warn "Platform not supported no wrapper libraries loaded." end if not pkgs.empty? search_me = File.(File.join(File.dirname(fname), dir,"**", "*#{pkgs}.rb")) Dir.glob(search_me).sort.each {|rb| require rb} end end |