def info_breakpoints(*args)
unless @state.context
print "info breakpoints not available here.\n"
return
end
unless Debugger.breakpoints.empty?
brkpts = Debugger.breakpoints.sort_by{|b| b.id}
unless args.empty?
a = args.map{|a| a.to_i}
brkpts = brkpts.select{|b| a.member?(b.id)}
if brkpts.empty?
errmsg "No breakpoints found among list given.\n"
return
end
end
print "Num Enb What\n"
brkpts.each do |b|
if b.expr.nil?
print "%3d %s at %s:%s\n",
b.id, (b.enabled? ? 'y' : 'n'), b.source, b.pos
else
print "%3d %s at %s:%s if %s\n",
b.id, (b.enabled? ? 'y' : 'n'), b.source, b.pos, b.expr
end
hits = b.hit_count
if hits > 0
s = (hits > 1) ? 's' : ''
print "\tbreakpoint already hit #{hits} time#{s}\n"
end
end
else
print "No breakpoints.\n"
end
end