Class: Ragweed::Process::AdlerChart
- Defined in:
- lib/ragweed/wrap32/process.rb
Overview
Quick and dirty visualization of a memory region by checksum changes.
Instance Method Summary collapse
-
#initialize(p, i) ⇒ AdlerChart
constructor
Create with a WinProcess and region index.
-
#to_s ⇒ Object
Just puts the chart repeatedly, to get: .….….….….….….….….….….….….….…...
Constructor Details
#initialize(p, i) ⇒ AdlerChart
Create with a WinProcess and region index
500 501 502 503 504 |
# File 'lib/ragweed/wrap32/process.rb', line 500 def initialize(p, i) @p = p @i = i @initstate = map end |
Instance Method Details
#to_s ⇒ Object
Just puts the chart repeatedly, to get: .….….….….….….….….….….….….….…... .….….….….….….….….….….….….….…..*.. .….….….….….….….….….….….….….…..*.. Where * represents a chunk of memory that has changed.
516 517 518 519 520 521 522 523 524 525 526 527 528 |
# File 'lib/ragweed/wrap32/process.rb', line 516 def to_s s = StringIO.new newstate = map @initstate.each_with_index do |sum, i| if sum != newstate[i] s.write "*" @initstate[i] = newstate[i] else s.write "." end end s.rewind;s.read() end |