trepanning 0.1.6 → 1.93.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. data/COPYING +57 -0
  2. data/ChangeLog +585 -736
  3. data/NEWS +26 -12
  4. data/README.md +62 -0
  5. data/Rakefile +15 -9
  6. data/app/breakpoint.rb +11 -12
  7. data/app/complete.rb +14 -14
  8. data/app/core.rb +34 -30
  9. data/app/default.rb +8 -7
  10. data/app/markdown.rb +191 -0
  11. data/app/options.rb +104 -99
  12. data/app/run.rb +9 -1
  13. data/app/util.rb +7 -7
  14. data/bin/trepan +7 -7
  15. data/interface.rb +0 -4
  16. data/interface/user.rb +11 -11
  17. data/io/input.rb +13 -13
  18. data/lib/trepanning.rb +30 -29
  19. data/processor.rb +40 -40
  20. data/processor/command.rb +13 -9
  21. data/processor/command/alias.rb +21 -15
  22. data/processor/command/backtrace.rb +27 -19
  23. data/processor/command/break.rb +24 -21
  24. data/processor/command/complete.rb +5 -2
  25. data/processor/command/condition.rb +14 -9
  26. data/processor/command/debug.rb +8 -8
  27. data/processor/command/down.rb +6 -6
  28. data/processor/command/edit.rb +4 -0
  29. data/processor/command/eval.rb +2 -2
  30. data/processor/command/exit.rb +12 -9
  31. data/processor/command/finish.rb +25 -23
  32. data/processor/command/frame.rb +30 -26
  33. data/processor/command/help.rb +203 -185
  34. data/processor/command/help/{command.txt → command.md} +21 -18
  35. data/processor/command/help/examples.md +20 -0
  36. data/processor/command/help/filename.md +46 -0
  37. data/processor/command/help/location.md +34 -0
  38. data/processor/command/help/suffixes.md +19 -0
  39. data/processor/command/info.rb +6 -4
  40. data/processor/command/info_subcmd/breakpoints.rb +13 -13
  41. data/processor/command/info_subcmd/files.rb +35 -31
  42. data/processor/command/info_subcmd/frame.rb +82 -33
  43. data/processor/command/info_subcmd/macro.rb +1 -1
  44. data/processor/command/info_subcmd/program.rb +8 -5
  45. data/processor/command/info_subcmd/registers.rb +15 -13
  46. data/processor/command/kill.rb +23 -17
  47. data/processor/command/list.rb +63 -56
  48. data/processor/command/macro.rb +45 -28
  49. data/processor/command/next.rb +29 -23
  50. data/processor/command/pp.rb +11 -9
  51. data/processor/command/pr.rb +10 -8
  52. data/processor/command/ps.rb +5 -5
  53. data/processor/command/quit.rb +24 -17
  54. data/processor/command/raise.rb +6 -6
  55. data/processor/command/reload.rb +9 -2
  56. data/processor/command/reload_subcmd/command.rb +4 -4
  57. data/processor/command/restart.rb +9 -4
  58. data/processor/command/save.rb +9 -9
  59. data/processor/command/server.rb +18 -17
  60. data/processor/command/set.rb +8 -6
  61. data/processor/command/set_subcmd/confirm.rb +15 -2
  62. data/processor/command/set_subcmd/different.rb +7 -5
  63. data/processor/command/set_subcmd/highlight.rb +14 -3
  64. data/processor/command/set_subcmd/pc.rb +62 -0
  65. data/processor/command/set_subcmd/sp.rb +8 -2
  66. data/processor/command/shell.rb +25 -23
  67. data/processor/command/show.rb +9 -7
  68. data/processor/command/show_subcmd/confirm.rb +12 -1
  69. data/processor/command/show_subcmd/highlight.rb +13 -3
  70. data/processor/command/source.rb +27 -26
  71. data/processor/command/step.rb +52 -43
  72. data/processor/command/tbreak.rb +9 -4
  73. data/processor/command/unalias.rb +9 -7
  74. data/processor/command/undisplay.rb +11 -7
  75. data/processor/command/up.rb +18 -13
  76. data/processor/command/watchg.rb +20 -17
  77. data/processor/complete.rb +120 -0
  78. data/processor/default.rb +47 -43
  79. data/processor/list.rb +23 -6
  80. data/processor/load_cmds.rb +25 -105
  81. data/processor/location.rb +104 -96
  82. data/processor/mock.rb +12 -12
  83. data/processor/msg.rb +61 -52
  84. data/processor/validate.rb +36 -27
  85. data/test/data/fname-with-blank.right +0 -1
  86. data/test/data/trace-mingw.right +28 -0
  87. data/test/data/trace.right +0 -2
  88. data/test/functional/test-raise.rb +3 -0
  89. data/test/integration/helper.rb +16 -16
  90. data/test/integration/test-debugger-stop.rb +8 -2
  91. data/test/integration/test-quit.rb +16 -15
  92. data/test/integration/test-trace.rb +19 -10
  93. data/test/unit/cmd-helper.rb +4 -1
  94. data/test/unit/test-app-complete.rb +3 -1
  95. data/test/unit/test-app-options.rb +7 -1
  96. data/test/unit/test-app-run.rb +9 -1
  97. data/test/unit/test-cmd-alias.rb +1 -1
  98. data/test/unit/test-cmd-edit.rb +2 -0
  99. data/test/unit/test-cmd-help.rb +10 -5
  100. data/test/unit/test-cmd-parse_list_cmd.rb +3 -3
  101. data/test/unit/test-completion.rb +2 -2
  102. data/test/unit/test-proc-default.rb +34 -0
  103. data/trepanning.gemspec +15 -14
  104. metadata +70 -44
  105. data/README.textile +0 -50
  106. data/processor/command/help/examples.txt +0 -16
  107. data/processor/command/help/filename.txt +0 -40
  108. data/processor/command/help/location.txt +0 -37
  109. data/processor/command/help/suffixes.txt +0 -17
  110. data/processor/command/info_subcmd/registers_subcmd/dfp.rb +0 -28
  111. data/processor/command/info_subcmd/registers_subcmd/lfp.rb +0 -47
  112. data/processor/command/nocache.rb +0 -32
  113. data/processor/command/parsetree.rb +0 -56
@@ -1,75 +1,84 @@
1
- # Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
1
+ # Copyright (C) 2010-2011, 2013, 2015 Rocky Bernstein <rockyb@rubyforge.net>
2
2
  require_relative '../command'
3
3
  require_relative '../../app/complete'
4
+
4
5
  class Trepan::Command::HelpCommand < Trepan::Command
5
- unless defined?(HELP)
6
- NAME = File.basename(__FILE__, '.rb')
7
- HELP = <<-HELP
8
- #{NAME} [command [subcommand]|expression]
6
+ unless defined?(HELP)
7
+ NAME = File.basename(__FILE__, '.rb')
8
+ HELP = <<-HELP
9
+ **#{NAME}** [*command* [*subcommand*]|*regexp*]
9
10
 
10
11
  Without argument, print the list of available debugger commands.
11
12
 
12
13
  When an argument is given, it is first checked to see if it is command
13
- name. 'help where' gives help on the 'where' debugger command.
14
-
15
- If the environment variable $PAGER is defined, the file is
16
- piped through that command. You'll notice this only for long help
17
- output.
14
+ name. For example, `help up` gives help on the `up` debugger command.
18
15
 
19
- Some commands like 'info', 'set', and 'show' can accept an
16
+ Some commands like `info`, `set`, and `show` can accept an
20
17
  additional subcommand to give help just about that particular
21
- subcommand. For example 'help info line' give help about the
18
+ subcommand. For example `help info line` give help about the
22
19
  info line command.
23
20
  HELP
24
21
 
25
- ALIASES = %w(?)
26
- CATEGORIES = {
27
- 'breakpoints' => 'Making the program stop at certain points',
28
- 'data' => 'Examining data',
29
- 'files' => 'Specifying and examining files',
30
- 'running' => 'Running the program',
31
- 'status' => 'Status inquiries',
32
- 'support' => 'Support facilities',
33
- 'stack' => 'Examining the call stack',
34
- 'syntax' => 'Debugger command syntax'
35
- }
36
- CATEGORY = 'support'
37
- NEED_STACK = false
38
- SHORT_HELP = 'Print commands or give help for command(s)'
39
-
40
- require 'thread_frame'
41
- ROOT_DIR = File.dirname(RubyVM::Frame.current.source_container[1])
42
- HELP_DIR = File.join(ROOT_DIR, 'help')
43
- end
22
+ ALIASES = %w(?)
23
+ CATEGORIES = {
24
+ 'breakpoints' => 'Making the program stop at certain points',
25
+ 'data' => 'Examining data',
26
+ 'files' => 'Specifying and examining files',
27
+ 'running' => 'Running the program',
28
+ 'status' => 'Status inquiries',
29
+ 'support' => 'Support facilities',
30
+ 'stack' => 'Examining the call stack',
31
+ 'syntax' => 'Debugger command syntax'
32
+ }
33
+ CATEGORY = 'support'
34
+ NEED_STACK = false
35
+ SHORT_HELP = 'Print commands or give help for command(s)'
36
+
37
+ ROOT_DIR = File.dirname(RubyVM::Frame.current.source_container[1])
38
+ HELP_DIR = File.join(ROOT_DIR, 'help')
39
+ MARKDOWN_EXTENSION='.md'
40
+ end
44
41
 
45
- def complete(prefix)
46
- matches = Trepan::Complete.complete_token(CATEGORIES.keys + %w(* all) +
47
- @proc.commands.keys, prefix)
48
- aliases = Trepan::Complete.complete_token_filtered(@proc.aliases, prefix,
49
- matches)
50
- (matches + aliases).sort
51
- end
52
-
53
- def complete_token_with_next(prefix)
54
- complete(prefix).map do |cmd|
55
- [cmd, @proc.commands.member?(cmd) ? @proc.commands[cmd] : nil]
56
- # complete_method =
57
- # if 'syntax' == cmd
58
- # Syntax.new(syntax_files)
59
- # else
60
- # @proc.commands.member?(cmd) ? @proc.commands[cmd] : nil
61
- # end
62
- # [cmd, complete_method]
42
+ def command_names(proc)
43
+ if proc.frame
44
+ proc.commands.keys
45
+ else
46
+ proc.commands.select {
47
+ |key, cmd|
48
+ !cmd.class.const_get(:NEED_STACK)
49
+ }.keys
50
+ end.sort
51
+ end
52
+
53
+
54
+ def complete(prefix)
55
+ matches = Trepan::Complete.complete_token(CATEGORIES.keys + %w(* all) +
56
+ command_names(@proc), prefix)
57
+ aliases = Trepan::Complete.complete_token_filtered(@proc.aliases, prefix,
58
+ matches)
59
+ (matches + aliases).sort
63
60
  end
64
- end
65
61
 
66
- # List the command categories and a short description of each.
67
- def list_categories
68
- section 'Help classes:'
69
- CATEGORIES.keys.sort.each do |cat|
70
- msg("%-13s -- %s" % [cat, CATEGORIES[cat]])
62
+ def complete_token_with_next(prefix)
63
+ complete(prefix).map do |cmd|
64
+ [cmd, @proc.commands.member?(cmd) ? @proc.commands[cmd] : nil]
65
+ # complete_method =
66
+ # if 'syntax' == cmd
67
+ # Syntax.new(syntax_files)
68
+ # else
69
+ # @proc.commands.member?(cmd) ? @proc.commands[cmd] : nil
70
+ # end
71
+ # [cmd, complete_method]
72
+ end
71
73
  end
72
- final_msg = '
74
+
75
+ # List the command categories and a short description of each.
76
+ def list_categories
77
+ section 'Help classes:'
78
+ CATEGORIES.keys.sort.each do |cat|
79
+ msg("%-13s -- %s" % [cat, CATEGORIES[cat]])
80
+ end
81
+ final_msg = '
73
82
  Type "help" followed by a class name for a list of help items in that class.
74
83
  Type "help aliases" for a list of current aliases.
75
84
  Type "help macros" for a list of current macros.
@@ -79,150 +88,159 @@ Type "help REGEXP" for the list of commands matching /^#{REGEXP}/.
79
88
  Type "help CLASS *" for the list of all commands in class CLASS.
80
89
  Type "help" followed by a command name for full documentation.
81
90
  '
82
- msg(final_msg)
91
+ msg(final_msg)
83
92
  end
84
93
 
85
- # This method runs the command
86
- def run(args) # :nodoc
87
- if args.size > 1
88
- cmd_name = args[1]
89
- if cmd_name == '*'
90
- section 'All command names:'
91
- msg columnize_commands(@proc.commands.keys.sort)
92
- show_aliases unless @proc.aliases.empty?
93
- show_macros unless @proc.macros.empty?
94
- elsif cmd_name =~ /^aliases$/i
95
- show_aliases
96
- elsif cmd_name =~ /^macros$/i
97
- show_macros
98
- elsif cmd_name =~ /^syntax$/i
99
- show_command_syntax(args)
100
- elsif cmd_name =~ /^all$/i
101
- CATEGORIES.sort.each do |category|
102
- show_category(category[0], [])
103
- msg('')
104
- end
105
- elsif CATEGORIES.member?(cmd_name)
106
- show_category(args[1], args[2..-1])
107
- elsif @proc.commands.member?(cmd_name) or @proc.aliases.member?(cmd_name)
108
- real_name =
109
- if @proc.commands.member?(cmd_name)
110
- cmd_name
111
- else
112
- @proc.aliases[cmd_name]
113
- end
114
- cmd_obj = @proc.commands[real_name]
115
- help_text =
116
- cmd_obj.respond_to?(:help) ? cmd_obj.help(args) :
117
- cmd_obj.class.const_get(:HELP)
118
- if help_text
119
- msg(help_text)
120
- if cmd_obj.class.constants.member?(:ALIASES) and
121
- args.size == 2
122
- msg "Aliases: #{cmd_obj.class.const_get(:ALIASES).join(', ')}"
123
- end
124
- end
125
- elsif @proc.macros.member?(cmd_name)
126
- msg "#{cmd_name} is a macro which expands to:"
127
- msg " #{@proc.macros[cmd_name]}", {:unlimited => true}
128
- else
129
- matches = @proc.commands.keys.grep(/^#{cmd_name}/).sort rescue []
130
- if matches.empty?
131
- errmsg("No commands found matching /^#{cmd_name}/. Try \"help\".")
94
+ # This method runs the command
95
+ def run(args) # :nodoc
96
+ if args.size > 1
97
+ cmd_name = args[1]
98
+ if cmd_name == '*'
99
+ section 'Currently-available command names:'
100
+ msg columnize_commands(command_names(@proc))
101
+ show_aliases unless @proc.aliases.empty?
102
+ show_macros unless @proc.macros.empty?
103
+ elsif cmd_name =~ /^aliases$/i
104
+ show_aliases
105
+ elsif cmd_name =~ /^macros$/i
106
+ show_macros
107
+ elsif cmd_name =~ /^syntax$/i
108
+ show_command_syntax(args)
109
+ elsif cmd_name =~ /^all$/i
110
+ CATEGORIES.sort.each do |category|
111
+ show_category(category[0], [])
112
+ msg('')
113
+ end
114
+ elsif CATEGORIES.member?(cmd_name)
115
+ show_category(args[1], args[2..-1])
116
+ elsif @proc.commands.member?(cmd_name) or @proc.aliases.member?(cmd_name)
117
+ real_name =
118
+ if @proc.commands.member?(cmd_name)
119
+ cmd_name
120
+ else
121
+ @proc.aliases[cmd_name]
122
+ end
123
+ cmd_obj = @proc.commands[real_name]
124
+ help_text =
125
+ cmd_obj.respond_to?(:help) ? cmd_obj.help(args) :
126
+ cmd_obj.class.const_get(:HELP)
127
+ if help_text
128
+ # FIXME: until we get the entire help cut over to markdown,
129
+ # we'll determine whether to use it or not based on whether the first
130
+ # character is '*'.
131
+ if help_text[0..0] == '*'
132
+ markdown help_text
133
+ else
134
+ msg(help_text)
135
+ end
136
+ if cmd_obj.class.constants.member?(:ALIASES) and
137
+ args.size == 2
138
+ markdown("**Aliases:** " +
139
+ "#{cmd_obj.class.const_get(:ALIASES).join(', ')}")
140
+ end
141
+ end
142
+ elsif @proc.macros.member?(cmd_name)
143
+ msg "#{cmd_name} is a macro which expands to:"
144
+ msg " #{@proc.macros[cmd_name]}", {:unlimited => true}
145
+ else
146
+ matches = @proc.commands.keys.grep(/^#{cmd_name}/).sort rescue []
147
+ if matches.empty?
148
+ errmsg("No commands found matching /^#{cmd_name}/. Try \"help\".")
149
+ else
150
+ section "Command names matching /^#{cmd_name}/:"
151
+ msg columnize_commands(matches.sort)
152
+ end
153
+ end
132
154
  else
133
- section "Command names matching /^#{cmd_name}/:"
134
- msg columnize_commands(matches.sort)
155
+ list_categories
135
156
  end
136
- end
137
- else
138
- list_categories
139
157
  end
140
- end
141
158
 
142
- def show_aliases
143
- section 'All alias names:'
144
- msg columnize_commands(@proc.aliases.keys.sort)
145
- end
146
-
147
- # Show short help for all commands in `category'.
148
- def show_category(category, args)
149
-
150
- if args.size == 1 && args[0] == '*'
151
- section "Commands in class %s:" % category
152
-
153
- cmds = @proc.commands.keys.select do |cmd_name|
154
- category == @proc.commands[cmd_name].category
155
- end.sort
156
- width = settings[:maxwidth]
157
- msg columnize_commands(cmds)
158
- return
159
+ def show_aliases
160
+ section 'All alias names:'
161
+ msg columnize_commands(@proc.aliases.keys.sort)
159
162
  end
160
-
161
- section "Command class: %s" % category
162
- @proc.commands.keys.sort.each do |name|
163
- next if category != @proc.commands[name].category
164
- msg("%-13s -- %s" % [name, @proc.commands[name].short_help])
163
+
164
+ # Show short help for all commands in `category'.
165
+ def show_category(category, args)
166
+
167
+ if args.size == 1 && args[0] == '*'
168
+ section "Commands in class %s:" % category
169
+
170
+ cmds = @proc.commands.keys.select do |cmd_name|
171
+ category == @proc.commands[cmd_name].category
172
+ end.sort
173
+ width = settings[:maxwidth]
174
+ msg columnize_commands(cmds)
175
+ return
176
+ end
177
+
178
+ section "Command class: %s" % category
179
+ @proc.commands.keys.sort.each do |name|
180
+ next if category != @proc.commands[name].category
181
+ msg("%-13s -- %s" % [name, @proc.commands[name].short_help])
182
+ end
165
183
  end
166
- end
167
-
168
- def syntax_files
169
- @syntax_files ||= Dir.glob(File.join(HELP_DIR, '*.txt')).map do |txt|
170
- basename = File.basename(txt, '.txt')
184
+
185
+ def syntax_files
186
+ @syntax_files ||= Dir.glob(File.join(HELP_DIR, "*#{MARKDOWN_EXTENSION}")).map do |name|
187
+ basename = File.basename(name, MARKDOWN_EXTENSION)
188
+ end
171
189
  end
172
- end
173
-
174
- def show_command_syntax(args)
175
- if args.size == 2
176
- @syntax_summary_help ||= {}
177
- section "List of syntax help"
178
- syntax_files.each do |name|
179
- @syntax_summary_help[name] ||=
180
- File.open(File.join(HELP_DIR, "#{name}.txt")).readline.chomp
181
- msg " %-8s -- %s" % [name, @syntax_summary_help[name]]
182
- end
183
- else
184
- args[2..-1].each do |name|
185
- if syntax_files.member?(name)
186
- @syntax_help ||= {}
187
- @syntax_help[name] =
188
- File.open(File.join(HELP_DIR, "#{name}.txt")).readlines[2..-1].join
189
- section "Debugger syntax for a #{name}:"
190
- msg @syntax_help[name]
190
+
191
+ def show_command_syntax(args)
192
+ if args.size == 2
193
+ @syntax_summary_help ||= {}
194
+ section "List of syntax help"
195
+ syntax_files.each do |name|
196
+ @syntax_summary_help[name] ||=
197
+ File.open(File.join(HELP_DIR, "#{name}#{MARKDOWN_EXTENSION}"))
198
+ .readline.chomp
199
+ msg " %-8s -- %s" % [name, @syntax_summary_help[name]]
200
+ end
191
201
  else
192
- errmsg "No syntax help for #{name}"
202
+ args[2..-1].each do |name|
203
+ if syntax_files.member?(name)
204
+ @syntax_help ||= {}
205
+ @syntax_help[name] =
206
+ File.open(File.join(HELP_DIR, "#{name}#{MARKDOWN_EXTENSION}"))
207
+ .readlines.join('')
208
+ markdown @syntax_help[name]
209
+ else
210
+ errmsg "No syntax help for #{name}"
211
+ end
212
+ end
193
213
  end
194
- end
195
214
  end
196
- end
197
215
 
198
- def show_macros
199
- section 'All macro names:'
200
- msg columnize_commands(@proc.macros.keys.sort)
201
- end
216
+ def show_macros
217
+ section 'All macro names:'
218
+ msg columnize_commands(@proc.macros.keys.sort)
219
+ end
202
220
 
203
221
  end
204
222
 
205
223
  if __FILE__ == $0
206
- # Demo it.
207
- require_relative '../mock'
208
- dbgr, cmd = MockDebugger::setup
209
-
210
- cmd.run %W(#{cmd.name} help)
211
- puts '=' * 40
212
- cmd.run %W(#{cmd.name} *)
213
- puts '=' * 40
214
- cmd.run %W(#{cmd.name} fdafsasfda)
215
- puts '=' * 40
216
- cmd.run [cmd.name]
217
- puts '=' * 40
218
- cmd.run %W(#{cmd.name} support)
219
- puts '=' * 40
220
- cmd.run %W(#{cmd.name} support *)
221
- puts '=' * 40
222
- cmd.run %W(#{cmd.name} s.*)
223
- puts '=' * 40
224
- cmd.run %W(#{cmd.name} s<>)
225
- puts '=' * 40
226
- p cmd.complete('br')
227
- p cmd.complete('un')
224
+ # Demo it.
225
+ require_relative '../mock'
226
+ dbgr, cmd = MockDebugger::setup
227
+
228
+ cmd.run %W(#{cmd.name} help)
229
+ puts '=' * 40
230
+ cmd.run %W(#{cmd.name} *)
231
+ puts '=' * 40
232
+ cmd.run %W(#{cmd.name} fdafsasfda)
233
+ puts '=' * 40
234
+ cmd.run [cmd.name]
235
+ puts '=' * 40
236
+ cmd.run %W(#{cmd.name} support)
237
+ puts '=' * 40
238
+ cmd.run %W(#{cmd.name} support *)
239
+ puts '=' * 40
240
+ cmd.run %W(#{cmd.name} s.*)
241
+ puts '=' * 40
242
+ cmd.run %W(#{cmd.name} s<>)
243
+ puts '=' * 40
244
+ p cmd.complete('br')
245
+ p cmd.complete('un')
228
246
  end
@@ -1,20 +1,21 @@
1
1
  Overall Debugger Command Syntax
2
+ ===============================
2
3
 
3
- If the first non-blank character of a line starts with #,
4
- the command is ignored.
4
+ If the first non-blank character of a line starts with `#`,
5
+ the command is ignored.
5
6
 
6
- If a line starts with ! in column one, the line is eval'd.
7
+ If a line starts with `!` in column one, the line is *eval*'d.
7
8
 
8
- If the command you want Ruby to eval uses ! initially, add that
9
- after the first ! or start the line with a space.
9
+ If the command you want Ruby to eval starts with `!`, add that
10
+ after the first `!` or start the line with a space.
10
11
 
11
- Commands are split at whereever ;; appears. This process disregards
12
+ Commands are split at whereever `;;` appears. This process disregards
12
13
  any quotes or other symbols that have meaning in Ruby. The strings
13
- after the leading command string are put back on a command queue.
14
+ after the leading command string are put back on a command queue.
14
15
 
15
16
  Within a single command, tokens are then white-space split. Again,
16
17
  this process disregards quotes or symbols that have meaning in Ruby.
17
- Some commands like 'eval', 'macro', and 'break' have access to the
18
+ Some commands like `eval`, `macro`, and `break` have access to the
18
19
  untokenized string entered and make use of that rather than the
19
20
  tokenized list.
20
21
 
@@ -23,9 +24,9 @@ omitted depending on early success or some debugger settings:
23
24
 
24
25
  1. The leading token is first looked up in the macro table. If it is in
25
26
  the table, the expansion is replaces the current command and possibly
26
- other commands pushed onto a command queue. See the "help macros" for
27
- help on how to define macros, and "info macro" for current macro
28
- definitions.
27
+ other commands pushed onto a command queue. See `help macros` for
28
+ help on how to define macros, and `info macro` for current macro
29
+ definitions.
29
30
 
30
31
  2. The leading token is next looked up in the debugger alias table and
31
32
  the name may be substituted there. See "help alias" for how to define
@@ -37,15 +38,15 @@ are dispatched to that command. Otherwise, we may check to see the the
37
38
  token is a unique prefix of a valid command. For example, "dis" is not
38
39
  a unique prefix because there are both "display" and "disable"
39
40
  commands, but "disp" is a unique prefix. You can allow or disallow
40
- abbreviations for commands using "set abbrev". The default is
41
- abbreviations are on.
41
+ abbreviations for commands using `set abbrev`. The default puts
42
+ abbreviations on.
42
43
 
43
44
  4. If after all of the above, we still don't find a command, the line
44
45
  may be evaluated as a Ruby statement in the current context of the
45
46
  program at the point it is stoppped. However this is done only if
46
- "autoeval" is on. (It is on by default.)
47
+ `autoeval` is on. It is on by default.
47
48
 
48
- If "auto eval" is not set on, or if running the Ruby statement
49
+ If `auto eval` is not set on, or if running the Ruby statement
49
50
  produces an error, we display an error message that the entered string
50
51
  is "undefined".
51
52
 
@@ -53,6 +54,8 @@ If you want irb-like command-processing, it's possible to go into an
53
54
  irb shell with the "irb" command. It is also possible to arrange going
54
55
  into an irb shell every time you enter the debugger.
55
56
 
56
- See also:
57
- "help syntax examples"
58
- "help syntax suffix"
57
+ See also:
58
+ ---------
59
+
60
+ * `help syntax examples`
61
+ * `help syntax suffixes`