Sha256: 0688eec9780a4cacd272817428bf717662040afcc8c643333eb088b45c14dca7

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env ruby

class FakeFDB

  def initialize
    str = "Adobe fdb (Flash Player Debugger) [build 16076]\n"
    str << "Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.\n"
    str << "(fdb) "
    printf str
    gather_input
  end

  def gather_input
    $stdout.flush
    command = $stdin.gets.chomp!
    if command == "run"
      handle_run
    elsif command == "continue"
      handle_continue
    elsif command == "kill"
      handle_kill
    elsif command == "quit"
      handle_quit
    else
      puts ""
      raise "Don't know how to respond to #{command}"
    end
    gather_input
  end

  def handle_run
    str = "Waiting for Player to connect\n"
    str << "Player connected; session starting.\n"
    str << "Set breakpoints and then type 'continue' to resume the session.\n"
    str = "[SWF] Users:lbayes:Projects:AsUnit-P2:asunit-4.0:bin:AsUnitRunner.swf - 226,833 bytes after decompression\n"
    str << "(fdb) "
    printf str
  end

  def handle_continue
    str = "Breakpoint 1, AsUnitRunner() at AsUnitRunner.as:12\n"
    str << "12                core = new TextCore();\n"
    str << "(fdb) "
    printf str
  end

  def handle_kill
    printf "Kill the program being debugged? (y or n) "
  end

  def handle_quit
    puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
    puts ">> EXITING NOW!"
    exit
  end

end

fdb = FakeFDB.new

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sprout-1.0.35.pre test/fixtures/executable/flex3sdk_gem/fdb