[patch] Remove unimplemented MI commands [Re: Learn function name by its address]

Paul Pluzhnikov ppluzhnikov@google.com
Sat Jun 27 18:44:00 GMT 2009


On Fri, Jun 26, 2009 at 3:41 PM, Joel Brobecker<brobecker@adacore.com> wrote:

>> I tend to think that if nobody has implemented these in $X years, then
>> nobody ever will.  But then, I'm generally also in the "never comment
>> out code, just delete it" camp.
>
> So am I. The code is still around, just in CVS instead of inside
> a comment.  Leaving it commented out just creates more clutter that
> tends to stay rather than being fixed. So I really favor deleting.

Ok, patch attached.

-- 
Paul Pluzhnikov

ChangeLog

2009-06-27  Paul Pluzhnikov  <ppluzhnikov@google.com>

       * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.

doc/ChangeLog

       * gdb.texinfo: Remove unimplemented MI commands.
-------------- next part --------------
Index: mi/mi-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.c,v
retrieving revision 1.40
diff -u -p -u -r1.40 mi-cmds.c
--- mi/mi-cmds.c	28 May 2009 01:09:20 -0000	1.40
+++ mi/mi-cmds.c	27 Jun 2009 18:35:43 -0000
@@ -34,8 +34,6 @@ static void build_table (struct mi_cmd *
 struct mi_cmd mi_cmds[] =
 {
   { "break-after", { "ignore", 1 }, NULL },
-  { "break-catch", { NULL, 0 }, NULL },
-  { "break-commands", { NULL, 0 }, NULL },
   { "break-condition", { "cond", 1 }, NULL },
   { "break-delete", { "delete breakpoint", 1 }, NULL },
   { "break-disable", { "disable breakpoint", 1 }, NULL },
@@ -57,7 +55,6 @@ struct mi_cmd mi_cmds[] =
   { "environment-directory", { NULL, 0 }, mi_cmd_env_dir},
   { "environment-path", { NULL, 0 }, mi_cmd_env_path},
   { "environment-pwd", { NULL, 0 }, mi_cmd_env_pwd},
-  { "exec-abort", { NULL, 0 }, NULL },
   { "exec-arguments", { "set args", 1 }, NULL },
   { "exec-continue", { NULL, 0 }, mi_cmd_exec_continue},
   { "exec-finish", { NULL, 0 }, mi_cmd_exec_finish},
@@ -67,25 +64,17 @@ struct mi_cmd mi_cmds[] =
   { "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction},
   { "exec-return", { NULL, 0 }, mi_cmd_exec_return},
   { "exec-run", { "run", 1 }, NULL},
-  { "exec-show-arguments", { NULL, 0 }, NULL },
-  { "exec-signal", { NULL, 0 }, NULL },
   { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
   { "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
   { "exec-until", { "until", 1 }, NULL},
-  { "file-clear", { NULL, 0 }, NULL },
   { "file-exec-and-symbols", { "file", 1 }, NULL },
   { "file-exec-file", { "exec-file", 1 }, NULL },
-  { "file-list-exec-sections", { NULL, 0 }, NULL },
   { "file-list-exec-source-file", { NULL, 0 }, mi_cmd_file_list_exec_source_file},
   { "file-list-exec-source-files", { NULL, 0 }, mi_cmd_file_list_exec_source_files },
-  { "file-list-shared-libraries", { NULL, 0 }, NULL },
-  { "file-list-symbol-files", { NULL, 0 }, NULL },
   { "file-symbol-file", { "symbol-file", 1 }, NULL },
-  { "gdb-complete", { NULL, 0 }, NULL },
   { "gdb-exit", { NULL, 0 }, mi_cmd_gdb_exit},
   { "gdb-set", { "set", 1 }, NULL },
   { "gdb-show", { "show", 1 }, NULL },
-  { "gdb-source", { NULL, 0 }, NULL },
   { "gdb-version", { "show version", 0 }, 0 },
   { "inferior-tty-set", { NULL, 0 }, mi_cmd_inferior_tty_set},
   { "inferior-tty-show", { NULL, 0 }, mi_cmd_inferior_tty_show},
@@ -93,65 +82,24 @@ struct mi_cmd mi_cmds[] =
   { "list-features", { NULL, 0 }, mi_cmd_list_features},
   { "list-target-features", { NULL, 0 }, mi_cmd_list_target_features},
   { "list-thread-groups", { NULL, 0 }, mi_cmd_list_thread_groups },  
-  { "overlay-auto", { NULL, 0 }, NULL },
-  { "overlay-list-mapping-state", { NULL, 0 }, NULL },
-  { "overlay-list-overlays", { NULL, 0 }, NULL },
-  { "overlay-map", { NULL, 0 }, NULL },
-  { "overlay-off", { NULL, 0 }, NULL },
-  { "overlay-on", { NULL, 0 }, NULL },
-  { "overlay-unmap", { NULL, 0 }, NULL },
-  { "signal-handle", { NULL, 0 }, NULL },
-  { "signal-list-handle-actions", { NULL, 0 }, NULL },
-  { "signal-list-signal-types", { NULL, 0 }, NULL },
   { "stack-info-depth", { NULL, 0 }, mi_cmd_stack_info_depth},
   { "stack-info-frame", { NULL, 0 }, mi_cmd_stack_info_frame},
   { "stack-list-arguments", { NULL, 0 }, mi_cmd_stack_list_args},
-  { "stack-list-exception-handlers", { NULL, 0 }, NULL },
   { "stack-list-frames", { NULL, 0 }, mi_cmd_stack_list_frames},
   { "stack-list-locals", { NULL, 0 }, mi_cmd_stack_list_locals},
   { "stack-select-frame", { NULL, 0 }, mi_cmd_stack_select_frame},
-  { "symbol-info-address", { NULL, 0 }, NULL },
-  { "symbol-info-file", { NULL, 0 }, NULL },
-  { "symbol-info-function", { NULL, 0 }, NULL },
-  { "symbol-info-line", { NULL, 0 }, NULL },
-  { "symbol-info-symbol", { NULL, 0 }, NULL },
-  { "symbol-list-functions", { NULL, 0 }, NULL },
   { "symbol-list-lines", { NULL, 0 }, mi_cmd_symbol_list_lines},
-  { "symbol-list-types", { NULL, 0 }, NULL },
-  { "symbol-list-variables", { NULL, 0 },  NULL },
-  { "symbol-locate", { NULL, 0 }, NULL },
-  { "symbol-type", { NULL, 0 }, NULL },
   { "target-attach", { "attach", 1 }, NULL },
-  { "target-compare-sections", { NULL, 0 }, NULL },
   { "target-detach", { NULL, 0 }, mi_cmd_target_detach },
   { "target-disconnect", { "disconnect", 0 }, 0 },
   { "target-download", { "load", 1 }, NULL},
-  { "target-exec-status", { NULL, 0 }, NULL },
   { "target-file-delete", { NULL, 0 }, mi_cmd_target_file_delete },
   { "target-file-get", { NULL, 0 }, mi_cmd_target_file_get },
   { "target-file-put", { NULL, 0 }, mi_cmd_target_file_put },
-  { "target-list-available-targets", { NULL, 0 }, NULL },
-  { "target-list-current-targets", { NULL, 0 }, NULL },
-  { "target-list-parameters", { NULL, 0 }, NULL },
   { "target-select", { "target", 1 }, NULL},
   { "thread-info", { NULL, 0 }, mi_cmd_thread_info },
   { "thread-list-ids", { NULL, 0 }, mi_cmd_thread_list_ids},
   { "thread-select", { NULL, 0 }, mi_cmd_thread_select},
-  { "trace-actions", { NULL, 0 }, NULL },
-  { "trace-delete", { NULL, 0 }, NULL },
-  { "trace-disable", { NULL, 0 }, NULL },
-  { "trace-dump", { NULL, 0 }, NULL },
-  { "trace-enable", { NULL, 0 }, NULL },
-  { "trace-exists", { NULL, 0 }, NULL },
-  { "trace-find", { NULL, 0 }, NULL },
-  { "trace-frame-number", { NULL, 0 }, NULL },
-  { "trace-info", { NULL, 0 }, NULL },
-  { "trace-insert", { NULL, 0 }, NULL },
-  { "trace-list", { NULL, 0 }, NULL },
-  { "trace-pass-count", { NULL, 0 }, NULL },
-  { "trace-save", { NULL, 0 }, NULL },
-  { "trace-start", { NULL, 0 }, NULL },
-  { "trace-stop", { NULL, 0 }, NULL },
   { "var-assign", { NULL, 0 }, mi_cmd_var_assign},
   { "var-create", { NULL, 0 }, mi_cmd_var_create},
   { "var-delete", { NULL, 0 }, mi_cmd_var_delete},
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.600
diff -u -p -u -r1.600 gdb.texinfo
--- doc/gdb.texinfo	15 Jun 2009 12:11:36 -0000	1.600
+++ doc/gdb.texinfo	27 Jun 2009 18:35:44 -0000
@@ -20453,7 +20453,6 @@ may repeat one or more times.
 * GDB/MI Stack Manipulation::
 * GDB/MI Variable Objects::
 * GDB/MI Data Manipulation::
-* GDB/MI Tracepoint Commands::
 * GDB/MI Symbol Query::
 * GDB/MI File Commands::
 @ignore
@@ -21324,14 +21323,6 @@ line="5",times="0",ignore="3"@}]@}
 (gdb)
 @end smallexample
 
-@ignore
-@subheading The @code{-break-catch} Command
-@findex -break-catch
-
-@subheading The @code{-break-commands} Command
-@findex -break-commands
-@end ignore
-
 
 @subheading The @code{-break-condition} Command
 @findex -break-condition
@@ -21856,25 +21847,6 @@ The corresponding @value{GDBN} command i
 @end smallexample
 
 
-@subheading The @code{-exec-show-arguments} Command
-@findex -exec-show-arguments
-
-@subsubheading Synopsis
-
-@smallexample
- -exec-show-arguments
-@end smallexample
-
-Print the arguments of the program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{show args}.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-environment-cd} Command
 @findex -environment-cd
 
@@ -22489,9 +22461,6 @@ signal-meaning="Interrupt"
 @end smallexample
 
 
-@c @subheading -exec-signal
-
-
 @subheading The @code{-exec-step} Command
 @findex -exec-step
 
@@ -22609,11 +22578,6 @@ file="recursive2.c",fullname="/home/foo/
 (gdb)
 @end smallexample
 
-@ignore
-@subheading -file-clear
-Is this going away????
-@end ignore
-
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Stack Manipulation
 @section @sc{gdb/mi} Stack Manipulation Commands
@@ -22771,8 +22735,6 @@ args=[@{name="intarg",value="2"@},
 (gdb)
 @end smallexample
 
-@c @subheading -stack-list-exception-handlers
-
 
 @subheading The @code{-stack-list-frames} Command
 @findex -stack-list-frames
@@ -24032,164 +23994,10 @@ next-page="0x000013c0",prev-page="0x0000
 @end smallexample
 
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Tracepoint Commands
-@section @sc{gdb/mi} Tracepoint Commands
-
-The tracepoint commands are not yet implemented.
-
-@c @subheading -trace-actions
-
-@c @subheading -trace-delete
-
-@c @subheading -trace-disable
-
-@c @subheading -trace-dump
-
-@c @subheading -trace-enable
-
-@c @subheading -trace-exists
-
-@c @subheading -trace-find
-
-@c @subheading -trace-frame-number
-
-@c @subheading -trace-info
-
-@c @subheading -trace-insert
-
-@c @subheading -trace-list
-
-@c @subheading -trace-pass-count
-
-@c @subheading -trace-save
-
-@c @subheading -trace-start
-
-@c @subheading -trace-stop
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Symbol Query
 @section @sc{gdb/mi} Symbol Query Commands
 
 
-@subheading The @code{-symbol-info-address} Command
-@findex -symbol-info-address
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-info-address @var{symbol}
-@end smallexample
-
-Describe where @var{symbol} is stored.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info address}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-file} Command
-@findex -symbol-info-file
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-info-file
-@end smallexample
-
-Show the file for the symbol.
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command.  @code{gdbtk} has
-@samp{gdb_find_file}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-function} Command
-@findex -symbol-info-function
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-info-function
-@end smallexample
-
-Show which function the symbol lives in.
-
-@subsubheading @value{GDBN} Command
-
-@samp{gdb_get_function} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-line} Command
-@findex -symbol-info-line
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-info-line
-@end smallexample
-
-Show the core addresses of the code for a source line.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info line}.
-@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-symbol} Command
-@findex -symbol-info-symbol
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-info-symbol @var{addr}
-@end smallexample
-
-Describe what symbol is at location @var{addr}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info symbol}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-list-functions} Command
-@findex -symbol-list-functions
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-list-functions
-@end smallexample
-
-List the functions in the executable.
-
-@subsubheading @value{GDBN} Command
-
-@samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and
-@samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-symbol-list-lines} Command
 @findex -symbol-list-lines
 
@@ -24216,82 +24024,6 @@ There is no corresponding @value{GDBN} c
 @end smallexample
 
 
-@subheading The @code{-symbol-list-types} Command
-@findex -symbol-list-types
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-list-types
-@end smallexample
-
-List all the type names.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding commands are @samp{info types} in @value{GDBN},
-@samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-list-variables} Command
-@findex -symbol-list-variables
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-list-variables
-@end smallexample
-
-List all the global and static variable names.
-
-@subsubheading @value{GDBN} Command
-
-@samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-locate} Command
-@findex -symbol-locate
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-locate
-@end smallexample
-
-@subsubheading @value{GDBN} Command
-
-@samp{gdb_loc} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-type} Command
-@findex -symbol-type
-
-@subsubheading Synopsis
-
-@smallexample
- -symbol-type @var{variable}
-@end smallexample
-
-Show type of @var{variable}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has
-@samp{gdb_obj_variable}.
-
-@subsubheading Example
-N.A.
-
-
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI File Commands
 @section @sc{gdb/mi} File Commands
@@ -24358,27 +24090,6 @@ The corresponding @value{GDBN} command i
 @end smallexample
 
 
-@subheading The @code{-file-list-exec-sections} Command
-@findex -file-list-exec-sections
-
-@subsubheading Synopsis
-
-@smallexample
- -file-list-exec-sections
-@end smallexample
-
-List the sections of the current executable file.
-
-@subsubheading @value{GDBN} Command
-
-The @value{GDBN} command @samp{info file} shows, among the rest, the same
-information as this command.  @code{gdbtk} has a corresponding command
-@samp{gdb_load_info}.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-file-list-exec-source-file} Command
 @findex -file-list-exec-source-file
 
@@ -24437,44 +24148,6 @@ The @value{GDBN} equivalent is @samp{inf
 (gdb)
 @end smallexample
 
-@subheading The @code{-file-list-shared-libraries} Command
-@findex -file-list-shared-libraries
-
-@subsubheading Synopsis
-
-@smallexample
- -file-list-shared-libraries
-@end smallexample
-
-List the shared libraries in the program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info shared}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-file-list-symbol-files} Command
-@findex -file-list-symbol-files
-
-@subsubheading Synopsis
-
-@smallexample
- -file-list-symbol-files
-@end smallexample
-
-List symbol files.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info file} (part of it).
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-file-symbol-file} Command
 @findex -file-symbol-file
 
@@ -24501,40 +24174,6 @@ The corresponding @value{GDBN} command i
 (gdb)
 @end smallexample
 
-@ignore
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Memory Overlay Commands
-@section @sc{gdb/mi} Memory Overlay Commands
-
-The memory overlay commands are not implemented.
-
-@c @subheading -overlay-auto
-
-@c @subheading -overlay-list-mapping-state
-
-@c @subheading -overlay-list-overlays
-
-@c @subheading -overlay-map
-
-@c @subheading -overlay-off
-
-@c @subheading -overlay-on
-
-@c @subheading -overlay-unmap
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Signal Handling Commands
-@section @sc{gdb/mi} Signal Handling Commands
-
-Signal handling commands are not implemented.
-
-@c @subheading -signal-handle
-
-@c @subheading -signal-list-handle-actions
-
-@c @subheading -signal-list-signal-types
-@end ignore
-
 
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Target Manipulation
@@ -24569,26 +24208,6 @@ The corresponding @value{GDBN} command i
 (gdb)
 @end smallexample
 
-@subheading The @code{-target-compare-sections} Command
-@findex -target-compare-sections
-
-@subsubheading Synopsis
-
-@smallexample
- -target-compare-sections [ @var{section} ]
-@end smallexample
-
-Compare data of section @var{section} on target to the exec file.
-Without the argument, all sections are compared.
-
-@subsubheading @value{GDBN} Command
-
-The @value{GDBN} equivalent is @samp{compare-sections}.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-target-detach} Command
 @findex -target-detach
 
@@ -24746,84 +24365,6 @@ write-rate="429"
 @end smallexample
 
 
-@subheading The @code{-target-exec-status} Command
-@findex -target-exec-status
-
-@subsubheading Synopsis
-
-@smallexample
- -target-exec-status
-@end smallexample
-
-Provide information on the state of the target (whether it is running or
-not, for instance).
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-available-targets} Command
-@findex -target-list-available-targets
-
-@subsubheading Synopsis
-
-@smallexample
- -target-list-available-targets
-@end smallexample
-
-List the possible targets to connect to.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{help target}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-current-targets} Command
-@findex -target-list-current-targets
-
-@subsubheading Synopsis
-
-@smallexample
- -target-list-current-targets
-@end smallexample
-
-Describe the current target.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding information is printed by @samp{info file} (among
-other things).
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-parameters} Command
-@findex -target-list-parameters
-
-@subsubheading Synopsis
-
-@smallexample
- -target-list-parameters
-@end smallexample
-
-@c ????
-
-@subsubheading @value{GDBN} Command
-
-No equivalent.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-target-select} Command
 @findex -target-select
 
@@ -24950,8 +24491,6 @@ The corresponding @value{GDBN} command i
 @node GDB/MI Miscellaneous Commands
 @section Miscellaneous @sc{gdb/mi} Commands
 
-@c @subheading -gdb-complete
-
 @subheading The @code{-gdb-exit} Command
 @findex -gdb-exit
 
@@ -24976,25 +24515,6 @@ Approximately corresponds to @samp{quit}
 @end smallexample
 
 
-@subheading The @code{-exec-abort} Command
-@findex -exec-abort
-
-@subsubheading Synopsis
-
-@smallexample
- -exec-abort
-@end smallexample
-
-Kill the inferior running program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{kill}.
-
-@subsubheading Example
-N.A.
-
-
 @subheading The @code{-gdb-set} Command
 @findex -gdb-set
 
@@ -25045,8 +24565,6 @@ The corresponding @value{GDBN} command i
 (gdb)
 @end smallexample
 
-@c @subheading -gdb-source
-
 
 @subheading The @code{-gdb-version} Command
 @findex -gdb-version


More information about the Gdb-patches mailing list