delete()
click to toggle source
def delete
disable
@deleted = true
end
deleted?()
click to toggle source
def deleted?
@deleted
end
description()
click to toggle source
disable()
click to toggle source
def disable
@tp&.disable
end
duplicable?()
click to toggle source
def duplicable?
false
end
enable()
click to toggle source
def enable
@tp.enable
end
enabled?()
click to toggle source
def enabled?
@tp.enabled?
end
generate_label(name)
click to toggle source
def generate_label(name)
colorize(" BP - #{name} ", [:YELLOW, :BOLD, :REVERSE])
end
oneshot?()
click to toggle source
def oneshot?
defined?(@oneshot) && @oneshot
end
safe_eval(b, expr)
click to toggle source
def safe_eval b, expr
b.eval(expr)
rescue Exception => e
puts "[EVAL ERROR]"
puts " expr: #{expr}"
puts " err: #{e} (#{e.class})"
puts "Error caused by #{self}."
nil
end
setup()
click to toggle source
def setup
raise "not implemented..."
end
skip_path?(path)
click to toggle source
def skip_path?(path)
if @path
!path.match?(@path)
else
super
end
end
suspend()
click to toggle source
def suspend
if @command
provider, pre_cmds, do_cmds = @command
nonstop = true if do_cmds
cmds = [*pre_cmds&.split(';;'), *do_cmds&.split(';;')]
SESSION.add_preset_commands provider, cmds, kick: false, continue: nonstop
end
ThreadClient.current.on_breakpoint @tp, self
end
to_s()
click to toggle source
def to_s
s = ''.dup
s << " if: #{@cond}" if defined?(@cond) && @cond
s << " pre: #{@command[1]}" if defined?(@command) && @command && @command[1]
s << " do: #{@command[2]}" if defined?(@command) && @command && @command[2]
s
end