byebug 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +897 -0
- data/CONTRIBUTING.md +58 -0
- data/GUIDE.md +1806 -0
- data/LICENSE +23 -0
- data/README.md +199 -0
- data/exe/byebug +6 -0
- data/ext/byebug/breakpoint.c +517 -0
- data/ext/byebug/byebug.c +905 -0
- data/ext/byebug/byebug.h +143 -0
- data/ext/byebug/context.c +673 -0
- data/ext/byebug/extconf.rb +12 -0
- data/ext/byebug/locker.c +96 -0
- data/ext/byebug/threads.c +230 -0
- data/lib/byebug.rb +3 -0
- data/lib/byebug/attacher.rb +48 -0
- data/lib/byebug/breakpoint.rb +111 -0
- data/lib/byebug/command.rb +111 -0
- data/lib/byebug/command_list.rb +34 -0
- data/lib/byebug/commands.rb +40 -0
- data/lib/byebug/commands/break.rb +112 -0
- data/lib/byebug/commands/catch.rb +78 -0
- data/lib/byebug/commands/condition.rb +55 -0
- data/lib/byebug/commands/continue.rb +68 -0
- data/lib/byebug/commands/debug.rb +38 -0
- data/lib/byebug/commands/delete.rb +55 -0
- data/lib/byebug/commands/disable.rb +33 -0
- data/lib/byebug/commands/disable/breakpoints.rb +42 -0
- data/lib/byebug/commands/disable/display.rb +43 -0
- data/lib/byebug/commands/display.rb +66 -0
- data/lib/byebug/commands/down.rb +45 -0
- data/lib/byebug/commands/edit.rb +69 -0
- data/lib/byebug/commands/enable.rb +33 -0
- data/lib/byebug/commands/enable/breakpoints.rb +42 -0
- data/lib/byebug/commands/enable/display.rb +43 -0
- data/lib/byebug/commands/finish.rb +57 -0
- data/lib/byebug/commands/frame.rb +57 -0
- data/lib/byebug/commands/help.rb +64 -0
- data/lib/byebug/commands/history.rb +39 -0
- data/lib/byebug/commands/info.rb +37 -0
- data/lib/byebug/commands/info/breakpoints.rb +65 -0
- data/lib/byebug/commands/info/display.rb +49 -0
- data/lib/byebug/commands/info/file.rb +80 -0
- data/lib/byebug/commands/info/line.rb +35 -0
- data/lib/byebug/commands/info/program.rb +49 -0
- data/lib/byebug/commands/interrupt.rb +34 -0
- data/lib/byebug/commands/irb.rb +50 -0
- data/lib/byebug/commands/kill.rb +45 -0
- data/lib/byebug/commands/list.rb +159 -0
- data/lib/byebug/commands/method.rb +53 -0
- data/lib/byebug/commands/next.rb +40 -0
- data/lib/byebug/commands/pry.rb +41 -0
- data/lib/byebug/commands/quit.rb +42 -0
- data/lib/byebug/commands/restart.rb +64 -0
- data/lib/byebug/commands/save.rb +72 -0
- data/lib/byebug/commands/set.rb +79 -0
- data/lib/byebug/commands/show.rb +45 -0
- data/lib/byebug/commands/skip.rb +85 -0
- data/lib/byebug/commands/source.rb +40 -0
- data/lib/byebug/commands/step.rb +40 -0
- data/lib/byebug/commands/thread.rb +34 -0
- data/lib/byebug/commands/thread/current.rb +37 -0
- data/lib/byebug/commands/thread/list.rb +43 -0
- data/lib/byebug/commands/thread/resume.rb +45 -0
- data/lib/byebug/commands/thread/stop.rb +43 -0
- data/lib/byebug/commands/thread/switch.rb +46 -0
- data/lib/byebug/commands/tracevar.rb +54 -0
- data/lib/byebug/commands/undisplay.rb +51 -0
- data/lib/byebug/commands/untracevar.rb +36 -0
- data/lib/byebug/commands/up.rb +45 -0
- data/lib/byebug/commands/var.rb +37 -0
- data/lib/byebug/commands/var/all.rb +41 -0
- data/lib/byebug/commands/var/args.rb +39 -0
- data/lib/byebug/commands/var/const.rb +49 -0
- data/lib/byebug/commands/var/global.rb +37 -0
- data/lib/byebug/commands/var/instance.rb +39 -0
- data/lib/byebug/commands/var/local.rb +39 -0
- data/lib/byebug/commands/where.rb +53 -0
- data/lib/byebug/context.rb +157 -0
- data/lib/byebug/core.rb +115 -0
- data/lib/byebug/errors.rb +29 -0
- data/lib/byebug/frame.rb +185 -0
- data/lib/byebug/helpers/bin.rb +47 -0
- data/lib/byebug/helpers/eval.rb +126 -0
- data/lib/byebug/helpers/file.rb +63 -0
- data/lib/byebug/helpers/frame.rb +75 -0
- data/lib/byebug/helpers/parse.rb +75 -0
- data/lib/byebug/helpers/path.rb +40 -0
- data/lib/byebug/helpers/reflection.rb +19 -0
- data/lib/byebug/helpers/string.rb +33 -0
- data/lib/byebug/helpers/thread.rb +67 -0
- data/lib/byebug/helpers/toggle.rb +62 -0
- data/lib/byebug/helpers/var.rb +54 -0
- data/lib/byebug/history.rb +130 -0
- data/lib/byebug/interface.rb +146 -0
- data/lib/byebug/interfaces/local_interface.rb +44 -0
- data/lib/byebug/interfaces/remote_interface.rb +50 -0
- data/lib/byebug/interfaces/script_interface.rb +33 -0
- data/lib/byebug/interfaces/test_interface.rb +67 -0
- data/lib/byebug/option_setter.rb +95 -0
- data/lib/byebug/printers/base.rb +68 -0
- data/lib/byebug/printers/plain.rb +44 -0
- data/lib/byebug/printers/texts/base.yml +115 -0
- data/lib/byebug/printers/texts/plain.yml +33 -0
- data/lib/byebug/processors/command_processor.rb +173 -0
- data/lib/byebug/processors/control_processor.rb +24 -0
- data/lib/byebug/processors/post_mortem_processor.rb +18 -0
- data/lib/byebug/processors/script_processor.rb +49 -0
- data/lib/byebug/remote.rb +85 -0
- data/lib/byebug/remote/client.rb +57 -0
- data/lib/byebug/remote/server.rb +47 -0
- data/lib/byebug/runner.rb +198 -0
- data/lib/byebug/setting.rb +79 -0
- data/lib/byebug/settings/autoirb.rb +29 -0
- data/lib/byebug/settings/autolist.rb +29 -0
- data/lib/byebug/settings/autopry.rb +29 -0
- data/lib/byebug/settings/autosave.rb +17 -0
- data/lib/byebug/settings/basename.rb +16 -0
- data/lib/byebug/settings/callstyle.rb +20 -0
- data/lib/byebug/settings/fullpath.rb +16 -0
- data/lib/byebug/settings/histfile.rb +20 -0
- data/lib/byebug/settings/histsize.rb +20 -0
- data/lib/byebug/settings/linetrace.rb +22 -0
- data/lib/byebug/settings/listsize.rb +21 -0
- data/lib/byebug/settings/post_mortem.rb +27 -0
- data/lib/byebug/settings/savefile.rb +20 -0
- data/lib/byebug/settings/stack_on_error.rb +15 -0
- data/lib/byebug/settings/width.rb +20 -0
- data/lib/byebug/source_file_formatter.rb +71 -0
- data/lib/byebug/subcommands.rb +54 -0
- data/lib/byebug/version.rb +8 -0
- metadata +199 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/command"
|
4
|
+
require "byebug/helpers/parse"
|
5
|
+
|
6
|
+
module Byebug
|
7
|
+
#
|
8
|
+
# Implements the step functionality.
|
9
|
+
#
|
10
|
+
# Allows the user the continue execution until the next instruction, possibily
|
11
|
+
# in a different frame. Use step to step into method calls or blocks.
|
12
|
+
#
|
13
|
+
class StepCommand < Command
|
14
|
+
include Helpers::ParseHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* s(?:tep)? (?:\s+(\S+))? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
s[tep][ times]
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Steps into blocks or methods one or more times"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
steps, err = parse_steps(@match[1], "Steps")
|
34
|
+
return errmsg(err) unless steps
|
35
|
+
|
36
|
+
context.step_into(steps, context.frame.pos)
|
37
|
+
processor.proceed!
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/subcommands"
|
4
|
+
|
5
|
+
require "byebug/commands/thread/current"
|
6
|
+
require "byebug/commands/thread/list"
|
7
|
+
require "byebug/commands/thread/resume"
|
8
|
+
require "byebug/commands/thread/stop"
|
9
|
+
require "byebug/commands/thread/switch"
|
10
|
+
|
11
|
+
module Byebug
|
12
|
+
#
|
13
|
+
# Manipulation of Ruby threads
|
14
|
+
#
|
15
|
+
class ThreadCommand < Command
|
16
|
+
include Subcommands
|
17
|
+
|
18
|
+
def self.regexp
|
19
|
+
/^\s* th(?:read)? (?:\s+ (.+))? \s*$/x
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
<<-DESCRIPTION
|
24
|
+
th[read] <subcommand>
|
25
|
+
|
26
|
+
#{short_description}
|
27
|
+
DESCRIPTION
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.short_description
|
31
|
+
"Commands to manipulate threads"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/helpers/thread"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Reopens the +thread+ command to define the +current+ subcommand
|
8
|
+
#
|
9
|
+
class ThreadCommand < Command
|
10
|
+
#
|
11
|
+
# Information about the current thread
|
12
|
+
#
|
13
|
+
class CurrentCommand < Command
|
14
|
+
include Helpers::ThreadHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* c(?:urrent)? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
th[read] c[urrent]
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Shows current thread information"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
display_context(context)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/helpers/thread"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Reopens the +thread+ command to define the +list+ subcommand
|
8
|
+
#
|
9
|
+
class ThreadCommand < Command
|
10
|
+
#
|
11
|
+
# Information about threads
|
12
|
+
#
|
13
|
+
class ListCommand < Command
|
14
|
+
include Helpers::ThreadHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* l(?:ist)? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
th[read] l[ist] <thnum>
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Lists all threads"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
contexts = Byebug.contexts.sort_by(&:thnum)
|
34
|
+
|
35
|
+
thread_list = prc("thread.context", contexts) do |context, _|
|
36
|
+
thread_arguments(context)
|
37
|
+
end
|
38
|
+
|
39
|
+
print(thread_list)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/helpers/thread"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Reopens the +thread+ command to define the +resume+ subcommand
|
8
|
+
#
|
9
|
+
class ThreadCommand < Command
|
10
|
+
#
|
11
|
+
# Resumes the specified thread
|
12
|
+
#
|
13
|
+
class ResumeCommand < Command
|
14
|
+
include Helpers::ThreadHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* r(?:esume)? (?: \s* (\d+))? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
th[read] r[esume] <thnum>
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Resumes execution of the specified thread"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
return puts(help) unless @match[1]
|
34
|
+
|
35
|
+
context, err = context_from_thread(@match[1])
|
36
|
+
return errmsg(err) if err
|
37
|
+
|
38
|
+
return errmsg(pr("thread.errors.already_running")) unless context.suspended?
|
39
|
+
|
40
|
+
context.resume
|
41
|
+
display_context(context)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/helpers/thread"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Reopens the +thread+ command to define the +stop+ subcommand
|
8
|
+
#
|
9
|
+
class ThreadCommand < Command
|
10
|
+
#
|
11
|
+
# Stops the specified thread
|
12
|
+
#
|
13
|
+
class StopCommand < Command
|
14
|
+
include Helpers::ThreadHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* st(?:op)? (?: \s* (\d+))? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
th[read] st[op] <thnum>
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Stops the execution of the specified thread"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
return puts(help) unless @match[1]
|
34
|
+
|
35
|
+
context, err = context_from_thread(@match[1])
|
36
|
+
return errmsg(err) if err
|
37
|
+
|
38
|
+
context.suspend
|
39
|
+
display_context(context)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/helpers/thread"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Reopens the +thread+ command to define the +switch+ subcommand
|
8
|
+
#
|
9
|
+
class ThreadCommand < Command
|
10
|
+
#
|
11
|
+
# Switches to the specified thread
|
12
|
+
#
|
13
|
+
class SwitchCommand < Command
|
14
|
+
include Helpers::ThreadHelper
|
15
|
+
|
16
|
+
def self.regexp
|
17
|
+
/^\s* sw(?:itch)? (?: \s* (\d+))? \s*$/x
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
<<-DESCRIPTION
|
22
|
+
th[read] sw[itch] <thnum>
|
23
|
+
|
24
|
+
#{short_description}
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Switches execution to the specified thread"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
return puts(help) unless @match[1]
|
34
|
+
|
35
|
+
context, err = context_from_thread(@match[1])
|
36
|
+
return errmsg(err) if err
|
37
|
+
|
38
|
+
display_context(context)
|
39
|
+
|
40
|
+
context.switch
|
41
|
+
|
42
|
+
processor.proceed!
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/command"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Show (and possibily stop) at every line that changes a global variable.
|
8
|
+
#
|
9
|
+
class TracevarCommand < Command
|
10
|
+
def self.regexp
|
11
|
+
/^\s* tr(?:acevar)? (?: \s+ (\S+))? # (variable-name)?
|
12
|
+
(?: \s+ (stop|nostop))?
|
13
|
+
\s*$/x
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.description
|
17
|
+
<<-DESCRIPTION
|
18
|
+
tr[acevar] <variable> [[no]stop]
|
19
|
+
|
20
|
+
#{short_description}
|
21
|
+
|
22
|
+
If "stop" is specified, execution will stop every time the variable
|
23
|
+
changes its value. If nothing or "nostop" is specified, execution won't
|
24
|
+
stop, changes will just be logged in byebug's output.
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.short_description
|
29
|
+
"Enables tracing of a global variable"
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
var = @match[1]
|
34
|
+
return errmsg(pr("trace.errors.needs_global_variable")) unless var
|
35
|
+
return errmsg(pr("trace.errors.var_is_not_global", name: var)) unless global_variables.include?(:"#{var}")
|
36
|
+
|
37
|
+
stop = @match[2] && @match[2] !~ /nostop/
|
38
|
+
|
39
|
+
instance_eval do
|
40
|
+
trace_var(:"#{var}") { |val| on_change(var, val, stop) }
|
41
|
+
end
|
42
|
+
|
43
|
+
puts pr("trace.messages.success", var: var)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def on_change(name, value, stop)
|
49
|
+
puts pr("trace.messages.on_change", name: name, value: value)
|
50
|
+
|
51
|
+
context.step_out(1, false) if stop
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/command"
|
4
|
+
require "byebug/helpers/parse"
|
5
|
+
|
6
|
+
module Byebug
|
7
|
+
#
|
8
|
+
# Remove expressions from display list.
|
9
|
+
#
|
10
|
+
class UndisplayCommand < Command
|
11
|
+
include Helpers::ParseHelper
|
12
|
+
|
13
|
+
self.allow_in_post_mortem = true
|
14
|
+
|
15
|
+
def self.regexp
|
16
|
+
/^\s* undisp(?:lay)? (?:\s+(\S+))? \s*$/x
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.description
|
20
|
+
<<-DESCRIPTION
|
21
|
+
undisp[lay][ nnn]
|
22
|
+
|
23
|
+
#{short_description}
|
24
|
+
|
25
|
+
Arguments are the code numbers of the expressions to stop displaying. No
|
26
|
+
argument means cancel all automatic-display expressions. Type "info
|
27
|
+
display" to see the current list of code numbers.
|
28
|
+
DESCRIPTION
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.short_description
|
32
|
+
"Stops displaying all or some expressions when program stops"
|
33
|
+
end
|
34
|
+
|
35
|
+
def execute
|
36
|
+
if @match[1]
|
37
|
+
pos, err = get_int(@match[1], "Undisplay", 1, Byebug.displays.size)
|
38
|
+
return errmsg(err) unless err.nil?
|
39
|
+
|
40
|
+
last_display = Byebug.displays[pos - 1]
|
41
|
+
return errmsg(pr("display.errors.undefined", expr: pos)) unless last_display
|
42
|
+
|
43
|
+
last_display[0] = nil
|
44
|
+
else
|
45
|
+
return unless confirm(pr("display.confirmations.clear_all"))
|
46
|
+
|
47
|
+
Byebug.displays.each { |d| d[0] = false }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "byebug/command"
|
4
|
+
|
5
|
+
module Byebug
|
6
|
+
#
|
7
|
+
# Stop tracing a global variable.
|
8
|
+
#
|
9
|
+
class UntracevarCommand < Command
|
10
|
+
def self.regexp
|
11
|
+
/^\s* untr(?:acevar)? (?:\s+ (\S+))? \s*$/x
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.description
|
15
|
+
<<-DESCRIPTION
|
16
|
+
untr[acevar] <variable>
|
17
|
+
|
18
|
+
#{short_description}
|
19
|
+
DESCRIPTION
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.short_description
|
23
|
+
"Stops tracing a global variable"
|
24
|
+
end
|
25
|
+
|
26
|
+
def execute
|
27
|
+
var = @match[1]
|
28
|
+
if global_variables.include?(:"#{var}")
|
29
|
+
untrace_var(:"#{var}")
|
30
|
+
puts pr("trace.messages.undo", var: var)
|
31
|
+
else
|
32
|
+
errmsg pr("trace.errors.not_global", var: var)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pathname"
|
4
|
+
require "byebug/command"
|
5
|
+
require "byebug/helpers/frame"
|
6
|
+
require "byebug/helpers/parse"
|
7
|
+
|
8
|
+
module Byebug
|
9
|
+
#
|
10
|
+
# Move the current frame up in the backtrace.
|
11
|
+
#
|
12
|
+
class UpCommand < Command
|
13
|
+
include Helpers::FrameHelper
|
14
|
+
include Helpers::ParseHelper
|
15
|
+
|
16
|
+
self.allow_in_post_mortem = true
|
17
|
+
|
18
|
+
def self.regexp
|
19
|
+
/^\s* up (?:\s+(\S+))? \s*$/x
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
<<-DESCRIPTION
|
24
|
+
up[ count]
|
25
|
+
|
26
|
+
#{short_description}
|
27
|
+
|
28
|
+
Use the "bt" command to find out where you want to go.
|
29
|
+
DESCRIPTION
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.short_description
|
33
|
+
"Moves to a higher frame in the stack trace"
|
34
|
+
end
|
35
|
+
|
36
|
+
def execute
|
37
|
+
pos, err = parse_steps(@match[1], "Up")
|
38
|
+
return errmsg(err) unless pos
|
39
|
+
|
40
|
+
jump_frames(pos)
|
41
|
+
|
42
|
+
ListCommand.new(processor).execute if Setting[:autolist]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|