Researching Ruby Debugger and the potential to make ORT

by Security Dude

“One of the many advantages of dynamic languages such as Ruby is the ability to introspect—to examine aspects of the program from within the program itself.”  This blog entry is just a collection of thoughts and notes as I try to validate whether I can recreate OPT in Ruby with Ruby.

Monday October 22 – 205pm – Just realized more key modules like Ruby Exception required for backtracing.

http://www.ruby-doc.org/core-1.9.3/Exception.html

Here is the technical blob

set_trace_func(p1) public

Establishes proc as the handler for tracing, or disables tracing if the parameter is nil. proc takes up to six parameters: an event name, a filename, a line number, an object id, a binding, and the name of a class.proc is invoked whenever an event occurs. Events are: c-call (call a C-language routine), c-return (return from a C-language routine), call (call a Ruby method), class (start a class or module definition), end (finish a class or module definition), line (execute code on a new line), raise (raise an exception), and return (return from a Ruby method). Tracing is disabled within the context of proc.

http://rubyforge.org/frs/?group_id=1900

http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-set_trace_func

http://phrogz.net/ProgrammingRuby/ospace.html#tracingyourprogramsexecution

http://phrogz.net/ProgrammingRuby/ref_m_kernel.html#Kernel.set_trace_func

http://rubyforge.org/docman/view.php/8883/10451/ruby-debug.html

http://needle.rubyforge.org/chapter-1.html

Advertisements