Sha256: a7f4ae4f3f54045eef6eb2b6a569e9454dcda47ea92a1390947adb98d29ee151
Contents?: true
Size: 1.38 KB
Versions: 6
Compression:
Stored size: 1.38 KB
Contents
# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net> require_relative '../app/display' require_relative 'virtual' class Trepan class CmdProcessor < VirtualCmdProcessor attr_reader :displays def display_initialize @displays = DisplayMgr.new end def display_find(num, show_errmsg = true) if 0 == @displays.size errmsg('No display expressions set.') if show_errmsg return nil elsif num > @displays.max || num < 1 errmsg('Display number %d is out of range 1..%d' % [num, @displays.max]) if show_errmsg return nil end disp = @displays[num] if disp return disp else errmsg('Display number %d previously deleted.' % num) if show_errmsg return nil end end # Enable or disable a breakpoint given its breakpoint number. def en_disable_display_by_number(num, do_enable=true) disp = display_find(num) return false unless disp enable_disable = do_enable ? 'en' : 'dis' if disp.enabled? == do_enable errmsg('Display %d previously %sabled.' % [num, enable_disable]) return false end disp.enabled = do_enable return true end def run_eval_display(args={}) for line in @displays.display(@frame) do msg(line) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems