Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/alt/ruby27/share/ruby
File: debug.rb
# frozen_string_literal: true
[0] Fix | Delete
# Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
[1] Fix | Delete
# Copyright (C) 2000 Information-technology Promotion Agency, Japan
[2] Fix | Delete
# Copyright (C) 2000-2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
[3] Fix | Delete
[4] Fix | Delete
require 'continuation'
[5] Fix | Delete
[6] Fix | Delete
require 'tracer'
[7] Fix | Delete
require 'pp'
[8] Fix | Delete
[9] Fix | Delete
class Tracer # :nodoc:
[10] Fix | Delete
def Tracer.trace_func(*vars)
[11] Fix | Delete
Single.trace_func(*vars)
[12] Fix | Delete
end
[13] Fix | Delete
end
[14] Fix | Delete
[15] Fix | Delete
SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ # :nodoc:
[16] Fix | Delete
[17] Fix | Delete
##
[18] Fix | Delete
# This library provides debugging functionality to Ruby.
[19] Fix | Delete
#
[20] Fix | Delete
# To add a debugger to your code, start by requiring +debug+ in your
[21] Fix | Delete
# program:
[22] Fix | Delete
#
[23] Fix | Delete
# def say(word)
[24] Fix | Delete
# require 'debug'
[25] Fix | Delete
# puts word
[26] Fix | Delete
# end
[27] Fix | Delete
#
[28] Fix | Delete
# This will cause Ruby to interrupt execution and show a prompt when the +say+
[29] Fix | Delete
# method is run.
[30] Fix | Delete
#
[31] Fix | Delete
# Once you're inside the prompt, you can start debugging your program.
[32] Fix | Delete
#
[33] Fix | Delete
# (rdb:1) p word
[34] Fix | Delete
# "hello"
[35] Fix | Delete
#
[36] Fix | Delete
# == Getting help
[37] Fix | Delete
#
[38] Fix | Delete
# You can get help at any time by pressing +h+.
[39] Fix | Delete
#
[40] Fix | Delete
# (rdb:1) h
[41] Fix | Delete
# Debugger help v.-0.002b
[42] Fix | Delete
# Commands
[43] Fix | Delete
# b[reak] [file:|class:]<line|method>
[44] Fix | Delete
# b[reak] [class.]<line|method>
[45] Fix | Delete
# set breakpoint to some position
[46] Fix | Delete
# wat[ch] <expression> set watchpoint to some expression
[47] Fix | Delete
# cat[ch] (<exception>|off) set catchpoint to an exception
[48] Fix | Delete
# b[reak] list breakpoints
[49] Fix | Delete
# cat[ch] show catchpoint
[50] Fix | Delete
# del[ete][ nnn] delete some or all breakpoints
[51] Fix | Delete
# disp[lay] <expression> add expression into display expression list
[52] Fix | Delete
# undisp[lay][ nnn] delete one particular or all display expressions
[53] Fix | Delete
# c[ont] run until program ends or hit breakpoint
[54] Fix | Delete
# s[tep][ nnn] step (into methods) one line or till line nnn
[55] Fix | Delete
# n[ext][ nnn] go over one line or till line nnn
[56] Fix | Delete
# w[here] display frames
[57] Fix | Delete
# f[rame] alias for where
[58] Fix | Delete
# l[ist][ (-|nn-mm)] list program, - lists backwards
[59] Fix | Delete
# nn-mm lists given lines
[60] Fix | Delete
# up[ nn] move to higher frame
[61] Fix | Delete
# down[ nn] move to lower frame
[62] Fix | Delete
# fin[ish] return to outer frame
[63] Fix | Delete
# tr[ace] (on|off) set trace mode of current thread
[64] Fix | Delete
# tr[ace] (on|off) all set trace mode of all threads
[65] Fix | Delete
# q[uit] exit from debugger
[66] Fix | Delete
# v[ar] g[lobal] show global variables
[67] Fix | Delete
# v[ar] l[ocal] show local variables
[68] Fix | Delete
# v[ar] i[nstance] <object> show instance variables of object
[69] Fix | Delete
# v[ar] c[onst] <object> show constants of object
[70] Fix | Delete
# m[ethod] i[nstance] <obj> show methods of object
[71] Fix | Delete
# m[ethod] <class|module> show instance methods of class or module
[72] Fix | Delete
# th[read] l[ist] list all threads
[73] Fix | Delete
# th[read] c[ur[rent]] show current thread
[74] Fix | Delete
# th[read] [sw[itch]] <nnn> switch thread context to nnn
[75] Fix | Delete
# th[read] stop <nnn> stop thread nnn
[76] Fix | Delete
# th[read] resume <nnn> resume thread nnn
[77] Fix | Delete
# p expression evaluate expression and print its value
[78] Fix | Delete
# h[elp] print this help
[79] Fix | Delete
# <everything else> evaluate
[80] Fix | Delete
#
[81] Fix | Delete
# == Usage
[82] Fix | Delete
#
[83] Fix | Delete
# The following is a list of common functionalities that the debugger
[84] Fix | Delete
# provides.
[85] Fix | Delete
#
[86] Fix | Delete
# === Navigating through your code
[87] Fix | Delete
#
[88] Fix | Delete
# In general, a debugger is used to find bugs in your program, which
[89] Fix | Delete
# often means pausing execution and inspecting variables at some point
[90] Fix | Delete
# in time.
[91] Fix | Delete
#
[92] Fix | Delete
# Let's look at an example:
[93] Fix | Delete
#
[94] Fix | Delete
# def my_method(foo)
[95] Fix | Delete
# require 'debug'
[96] Fix | Delete
# foo = get_foo if foo.nil?
[97] Fix | Delete
# raise if foo.nil?
[98] Fix | Delete
# end
[99] Fix | Delete
#
[100] Fix | Delete
# When you run this program, the debugger will kick in just before the
[101] Fix | Delete
# +foo+ assignment.
[102] Fix | Delete
#
[103] Fix | Delete
# (rdb:1) p foo
[104] Fix | Delete
# nil
[105] Fix | Delete
#
[106] Fix | Delete
# In this example, it'd be interesting to move to the next line and
[107] Fix | Delete
# inspect the value of +foo+ again. You can do that by pressing +n+:
[108] Fix | Delete
#
[109] Fix | Delete
# (rdb:1) n # goes to next line
[110] Fix | Delete
# (rdb:1) p foo
[111] Fix | Delete
# nil
[112] Fix | Delete
#
[113] Fix | Delete
# You now know that the original value of +foo+ was nil, and that it
[114] Fix | Delete
# still was nil after calling +get_foo+.
[115] Fix | Delete
#
[116] Fix | Delete
# Other useful commands for navigating through your code are:
[117] Fix | Delete
#
[118] Fix | Delete
# +c+::
[119] Fix | Delete
# Runs the program until it either exists or encounters another breakpoint.
[120] Fix | Delete
# You usually press +c+ when you are finished debugging your program and
[121] Fix | Delete
# want to resume its execution.
[122] Fix | Delete
# +s+::
[123] Fix | Delete
# Steps into method definition. In the previous example, +s+ would take you
[124] Fix | Delete
# inside the method definition of +get_foo+.
[125] Fix | Delete
# +r+::
[126] Fix | Delete
# Restart the program.
[127] Fix | Delete
# +q+::
[128] Fix | Delete
# Quit the program.
[129] Fix | Delete
#
[130] Fix | Delete
# === Inspecting variables
[131] Fix | Delete
#
[132] Fix | Delete
# You can use the debugger to easily inspect both local and global variables.
[133] Fix | Delete
# We've seen how to inspect local variables before:
[134] Fix | Delete
#
[135] Fix | Delete
# (rdb:1) p my_arg
[136] Fix | Delete
# 42
[137] Fix | Delete
#
[138] Fix | Delete
# You can also pretty print the result of variables or expressions:
[139] Fix | Delete
#
[140] Fix | Delete
# (rdb:1) pp %w{a very long long array containing many words}
[141] Fix | Delete
# ["a",
[142] Fix | Delete
# "very",
[143] Fix | Delete
# "long",
[144] Fix | Delete
# ...
[145] Fix | Delete
# ]
[146] Fix | Delete
#
[147] Fix | Delete
# You can list all local variables with +v l+:
[148] Fix | Delete
#
[149] Fix | Delete
# (rdb:1) v l
[150] Fix | Delete
# foo => "hello"
[151] Fix | Delete
#
[152] Fix | Delete
# Similarly, you can show all global variables with +v g+:
[153] Fix | Delete
#
[154] Fix | Delete
# (rdb:1) v g
[155] Fix | Delete
# all global variables
[156] Fix | Delete
#
[157] Fix | Delete
# Finally, you can omit +p+ if you simply want to evaluate a variable or
[158] Fix | Delete
# expression
[159] Fix | Delete
#
[160] Fix | Delete
# (rdb:1) 5**2
[161] Fix | Delete
# 25
[162] Fix | Delete
#
[163] Fix | Delete
# === Going beyond basics
[164] Fix | Delete
#
[165] Fix | Delete
# Ruby Debug provides more advanced functionalities like switching
[166] Fix | Delete
# between threads, setting breakpoints and watch expressions, and more.
[167] Fix | Delete
# The full list of commands is available at any time by pressing +h+.
[168] Fix | Delete
#
[169] Fix | Delete
# == Staying out of trouble
[170] Fix | Delete
#
[171] Fix | Delete
# Make sure you remove every instance of +require 'debug'+ before
[172] Fix | Delete
# shipping your code. Failing to do so may result in your program
[173] Fix | Delete
# hanging unpredictably.
[174] Fix | Delete
#
[175] Fix | Delete
# Debug is not available in safe mode.
[176] Fix | Delete
[177] Fix | Delete
class DEBUGGER__
[178] Fix | Delete
MUTEX = Thread::Mutex.new # :nodoc:
[179] Fix | Delete
[180] Fix | Delete
class Context # :nodoc:
[181] Fix | Delete
DEBUG_LAST_CMD = []
[182] Fix | Delete
[183] Fix | Delete
begin
[184] Fix | Delete
require 'readline'
[185] Fix | Delete
def readline(prompt, hist)
[186] Fix | Delete
Readline::readline(prompt, hist)
[187] Fix | Delete
end
[188] Fix | Delete
rescue LoadError
[189] Fix | Delete
def readline(prompt, hist)
[190] Fix | Delete
STDOUT.print prompt
[191] Fix | Delete
STDOUT.flush
[192] Fix | Delete
line = STDIN.gets
[193] Fix | Delete
exit unless line
[194] Fix | Delete
line.chomp!
[195] Fix | Delete
line
[196] Fix | Delete
end
[197] Fix | Delete
USE_READLINE = false
[198] Fix | Delete
end
[199] Fix | Delete
[200] Fix | Delete
def initialize
[201] Fix | Delete
if Thread.current == Thread.main
[202] Fix | Delete
@stop_next = 1
[203] Fix | Delete
else
[204] Fix | Delete
@stop_next = 0
[205] Fix | Delete
end
[206] Fix | Delete
@last_file = nil
[207] Fix | Delete
@file = nil
[208] Fix | Delete
@line = nil
[209] Fix | Delete
@no_step = nil
[210] Fix | Delete
@frames = []
[211] Fix | Delete
@finish_pos = 0
[212] Fix | Delete
@trace = false
[213] Fix | Delete
@catch = "StandardError"
[214] Fix | Delete
@suspend_next = false
[215] Fix | Delete
end
[216] Fix | Delete
[217] Fix | Delete
def stop_next(n=1)
[218] Fix | Delete
@stop_next = n
[219] Fix | Delete
end
[220] Fix | Delete
[221] Fix | Delete
def set_suspend
[222] Fix | Delete
@suspend_next = true
[223] Fix | Delete
end
[224] Fix | Delete
[225] Fix | Delete
def clear_suspend
[226] Fix | Delete
@suspend_next = false
[227] Fix | Delete
end
[228] Fix | Delete
[229] Fix | Delete
def suspend_all
[230] Fix | Delete
DEBUGGER__.suspend
[231] Fix | Delete
end
[232] Fix | Delete
[233] Fix | Delete
def resume_all
[234] Fix | Delete
DEBUGGER__.resume
[235] Fix | Delete
end
[236] Fix | Delete
[237] Fix | Delete
def check_suspend
[238] Fix | Delete
while MUTEX.synchronize {
[239] Fix | Delete
if @suspend_next
[240] Fix | Delete
DEBUGGER__.waiting.push Thread.current
[241] Fix | Delete
@suspend_next = false
[242] Fix | Delete
true
[243] Fix | Delete
end
[244] Fix | Delete
}
[245] Fix | Delete
end
[246] Fix | Delete
end
[247] Fix | Delete
[248] Fix | Delete
def trace?
[249] Fix | Delete
@trace
[250] Fix | Delete
end
[251] Fix | Delete
[252] Fix | Delete
def set_trace(arg)
[253] Fix | Delete
@trace = arg
[254] Fix | Delete
end
[255] Fix | Delete
[256] Fix | Delete
def stdout
[257] Fix | Delete
DEBUGGER__.stdout
[258] Fix | Delete
end
[259] Fix | Delete
[260] Fix | Delete
def break_points
[261] Fix | Delete
DEBUGGER__.break_points
[262] Fix | Delete
end
[263] Fix | Delete
[264] Fix | Delete
def display
[265] Fix | Delete
DEBUGGER__.display
[266] Fix | Delete
end
[267] Fix | Delete
[268] Fix | Delete
def context(th)
[269] Fix | Delete
DEBUGGER__.context(th)
[270] Fix | Delete
end
[271] Fix | Delete
[272] Fix | Delete
def set_trace_all(arg)
[273] Fix | Delete
DEBUGGER__.set_trace(arg)
[274] Fix | Delete
end
[275] Fix | Delete
[276] Fix | Delete
def set_last_thread(th)
[277] Fix | Delete
DEBUGGER__.set_last_thread(th)
[278] Fix | Delete
end
[279] Fix | Delete
[280] Fix | Delete
def debug_eval(str, binding)
[281] Fix | Delete
begin
[282] Fix | Delete
eval(str, binding)
[283] Fix | Delete
rescue StandardError, ScriptError => e
[284] Fix | Delete
at = eval("caller(1)", binding)
[285] Fix | Delete
stdout.printf "%s:%s\n", at.shift, e.to_s.sub(/\(eval\):1:(in `.*?':)?/, '')
[286] Fix | Delete
for i in at
[287] Fix | Delete
stdout.printf "\tfrom %s\n", i
[288] Fix | Delete
end
[289] Fix | Delete
throw :debug_error
[290] Fix | Delete
end
[291] Fix | Delete
end
[292] Fix | Delete
[293] Fix | Delete
def debug_silent_eval(str, binding)
[294] Fix | Delete
begin
[295] Fix | Delete
eval(str, binding)
[296] Fix | Delete
rescue StandardError, ScriptError
[297] Fix | Delete
nil
[298] Fix | Delete
end
[299] Fix | Delete
end
[300] Fix | Delete
[301] Fix | Delete
def var_list(ary, binding)
[302] Fix | Delete
ary.sort!
[303] Fix | Delete
for v in ary
[304] Fix | Delete
stdout.printf " %s => %s\n", v, eval(v.to_s, binding).inspect
[305] Fix | Delete
end
[306] Fix | Delete
end
[307] Fix | Delete
[308] Fix | Delete
def debug_variable_info(input, binding)
[309] Fix | Delete
case input
[310] Fix | Delete
when /^\s*g(?:lobal)?\s*$/
[311] Fix | Delete
var_list(global_variables, binding)
[312] Fix | Delete
[313] Fix | Delete
when /^\s*l(?:ocal)?\s*$/
[314] Fix | Delete
var_list(eval("local_variables", binding), binding)
[315] Fix | Delete
[316] Fix | Delete
when /^\s*i(?:nstance)?\s+/
[317] Fix | Delete
obj = debug_eval($', binding)
[318] Fix | Delete
var_list(obj.instance_variables, obj.instance_eval{binding()})
[319] Fix | Delete
[320] Fix | Delete
when /^\s*c(?:onst(?:ant)?)?\s+/
[321] Fix | Delete
obj = debug_eval($', binding)
[322] Fix | Delete
unless obj.kind_of? Module
[323] Fix | Delete
stdout.print "Should be Class/Module: ", $', "\n"
[324] Fix | Delete
else
[325] Fix | Delete
var_list(obj.constants, obj.module_eval{binding()})
[326] Fix | Delete
end
[327] Fix | Delete
end
[328] Fix | Delete
end
[329] Fix | Delete
[330] Fix | Delete
def debug_method_info(input, binding)
[331] Fix | Delete
case input
[332] Fix | Delete
when /^i(:?nstance)?\s+/
[333] Fix | Delete
obj = debug_eval($', binding)
[334] Fix | Delete
[335] Fix | Delete
len = 0
[336] Fix | Delete
for v in obj.methods.sort
[337] Fix | Delete
len += v.size + 1
[338] Fix | Delete
if len > 70
[339] Fix | Delete
len = v.size + 1
[340] Fix | Delete
stdout.print "\n"
[341] Fix | Delete
end
[342] Fix | Delete
stdout.print v, " "
[343] Fix | Delete
end
[344] Fix | Delete
stdout.print "\n"
[345] Fix | Delete
[346] Fix | Delete
else
[347] Fix | Delete
obj = debug_eval(input, binding)
[348] Fix | Delete
unless obj.kind_of? Module
[349] Fix | Delete
stdout.print "Should be Class/Module: ", input, "\n"
[350] Fix | Delete
else
[351] Fix | Delete
len = 0
[352] Fix | Delete
for v in obj.instance_methods(false).sort
[353] Fix | Delete
len += v.size + 1
[354] Fix | Delete
if len > 70
[355] Fix | Delete
len = v.size + 1
[356] Fix | Delete
stdout.print "\n"
[357] Fix | Delete
end
[358] Fix | Delete
stdout.print v, " "
[359] Fix | Delete
end
[360] Fix | Delete
stdout.print "\n"
[361] Fix | Delete
end
[362] Fix | Delete
end
[363] Fix | Delete
end
[364] Fix | Delete
[365] Fix | Delete
def thnum
[366] Fix | Delete
num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
[367] Fix | Delete
unless num
[368] Fix | Delete
DEBUGGER__.make_thread_list
[369] Fix | Delete
num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
[370] Fix | Delete
end
[371] Fix | Delete
num
[372] Fix | Delete
end
[373] Fix | Delete
[374] Fix | Delete
def debug_command(file, line, id, binding)
[375] Fix | Delete
MUTEX.lock
[376] Fix | Delete
unless defined?($debugger_restart) and $debugger_restart
[377] Fix | Delete
callcc{|c| $debugger_restart = c}
[378] Fix | Delete
end
[379] Fix | Delete
set_last_thread(Thread.current)
[380] Fix | Delete
frame_pos = 0
[381] Fix | Delete
binding_file = file
[382] Fix | Delete
binding_line = line
[383] Fix | Delete
previous_line = nil
[384] Fix | Delete
if ENV['EMACS']
[385] Fix | Delete
stdout.printf "\032\032%s:%d:\n", binding_file, binding_line
[386] Fix | Delete
else
[387] Fix | Delete
stdout.printf "%s:%d:%s", binding_file, binding_line,
[388] Fix | Delete
line_at(binding_file, binding_line)
[389] Fix | Delete
end
[390] Fix | Delete
@frames[0] = [binding, file, line, id]
[391] Fix | Delete
display_expressions(binding)
[392] Fix | Delete
prompt = true
[393] Fix | Delete
while prompt and input = readline("(rdb:%d) "%thnum(), true)
[394] Fix | Delete
catch(:debug_error) do
[395] Fix | Delete
if input == ""
[396] Fix | Delete
next unless DEBUG_LAST_CMD[0]
[397] Fix | Delete
input = DEBUG_LAST_CMD[0]
[398] Fix | Delete
stdout.print input, "\n"
[399] Fix | Delete
else
[400] Fix | Delete
DEBUG_LAST_CMD[0] = input
[401] Fix | Delete
end
[402] Fix | Delete
[403] Fix | Delete
case input
[404] Fix | Delete
when /^\s*tr(?:ace)?(?:\s+(on|off))?(?:\s+(all))?$/
[405] Fix | Delete
if defined?( $2 )
[406] Fix | Delete
if $1 == 'on'
[407] Fix | Delete
set_trace_all true
[408] Fix | Delete
else
[409] Fix | Delete
set_trace_all false
[410] Fix | Delete
end
[411] Fix | Delete
elsif defined?( $1 )
[412] Fix | Delete
if $1 == 'on'
[413] Fix | Delete
set_trace true
[414] Fix | Delete
else
[415] Fix | Delete
set_trace false
[416] Fix | Delete
end
[417] Fix | Delete
end
[418] Fix | Delete
if trace?
[419] Fix | Delete
stdout.print "Trace on.\n"
[420] Fix | Delete
else
[421] Fix | Delete
stdout.print "Trace off.\n"
[422] Fix | Delete
end
[423] Fix | Delete
[424] Fix | Delete
when /^\s*b(?:reak)?\s+(?:(.+):)?([^.:]+)$/
[425] Fix | Delete
pos = $2
[426] Fix | Delete
if $1
[427] Fix | Delete
klass = debug_silent_eval($1, binding)
[428] Fix | Delete
file = File.expand_path($1)
[429] Fix | Delete
end
[430] Fix | Delete
if pos =~ /^\d+$/
[431] Fix | Delete
pname = pos
[432] Fix | Delete
pos = pos.to_i
[433] Fix | Delete
else
[434] Fix | Delete
pname = pos = pos.intern.id2name
[435] Fix | Delete
end
[436] Fix | Delete
break_points.push [true, 0, klass || file, pos]
[437] Fix | Delete
stdout.printf "Set breakpoint %d at %s:%s\n", break_points.size, klass || file, pname
[438] Fix | Delete
[439] Fix | Delete
when /^\s*b(?:reak)?\s+(.+)[#.]([^.:]+)$/
[440] Fix | Delete
pos = $2.intern.id2name
[441] Fix | Delete
klass = debug_eval($1, binding)
[442] Fix | Delete
break_points.push [true, 0, klass, pos]
[443] Fix | Delete
stdout.printf "Set breakpoint %d at %s.%s\n", break_points.size, klass, pos
[444] Fix | Delete
[445] Fix | Delete
when /^\s*wat(?:ch)?\s+(.+)$/
[446] Fix | Delete
exp = $1
[447] Fix | Delete
break_points.push [true, 1, exp]
[448] Fix | Delete
stdout.printf "Set watchpoint %d:%s\n", break_points.size, exp
[449] Fix | Delete
[450] Fix | Delete
when /^\s*b(?:reak)?$/
[451] Fix | Delete
if break_points.find{|b| b[1] == 0}
[452] Fix | Delete
n = 1
[453] Fix | Delete
stdout.print "Breakpoints:\n"
[454] Fix | Delete
break_points.each do |b|
[455] Fix | Delete
if b[0] and b[1] == 0
[456] Fix | Delete
stdout.printf " %d %s:%s\n", n, b[2], b[3]
[457] Fix | Delete
end
[458] Fix | Delete
n += 1
[459] Fix | Delete
end
[460] Fix | Delete
end
[461] Fix | Delete
if break_points.find{|b| b[1] == 1}
[462] Fix | Delete
n = 1
[463] Fix | Delete
stdout.print "\n"
[464] Fix | Delete
stdout.print "Watchpoints:\n"
[465] Fix | Delete
for b in break_points
[466] Fix | Delete
if b[0] and b[1] == 1
[467] Fix | Delete
stdout.printf " %d %s\n", n, b[2]
[468] Fix | Delete
end
[469] Fix | Delete
n += 1
[470] Fix | Delete
end
[471] Fix | Delete
end
[472] Fix | Delete
if break_points.size == 0
[473] Fix | Delete
stdout.print "No breakpoints\n"
[474] Fix | Delete
else
[475] Fix | Delete
stdout.print "\n"
[476] Fix | Delete
end
[477] Fix | Delete
[478] Fix | Delete
when /^\s*del(?:ete)?(?:\s+(\d+))?$/
[479] Fix | Delete
pos = $1
[480] Fix | Delete
unless pos
[481] Fix | Delete
input = readline("Clear all breakpoints? (y/n) ", false)
[482] Fix | Delete
if input == "y"
[483] Fix | Delete
for b in break_points
[484] Fix | Delete
b[0] = false
[485] Fix | Delete
end
[486] Fix | Delete
end
[487] Fix | Delete
else
[488] Fix | Delete
pos = pos.to_i
[489] Fix | Delete
if break_points[pos-1]
[490] Fix | Delete
break_points[pos-1][0] = false
[491] Fix | Delete
else
[492] Fix | Delete
stdout.printf "Breakpoint %d is not defined\n", pos
[493] Fix | Delete
end
[494] Fix | Delete
end
[495] Fix | Delete
[496] Fix | Delete
when /^\s*disp(?:lay)?\s+(.+)$/
[497] Fix | Delete
exp = $1
[498] Fix | Delete
display.push [true, exp]
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function