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

Paul Pluzhnikov
2009-06-28T04:13:15Z

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

On Sat, Jun 27, 2009 at 8:18 PM, Eli Zaretskii<eliz@gnu.org> wrote:

> I thought the suggestion was to comment it out in the code as well.

It was msnyder and I for commenting vs. tromey and brobecker for
deleting. Now that I've actually done it, I am for deleting as well
:-)

> But in any case, no, there's no consistency issue here: while most
> humans read the code, almost no one reads the Texinfo sources

Ok. Updated patch attached.

--
Paul Pluzhnikov

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

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

doc/ChangeLog

* gdb.texinfo (GDB/MI Program Context): @ignore unimplemented
MI commands.
(GDB/MI Symbol Query): Likewise.
(GDB/MI File Commands): Likewise.
(GDB/MI File Transfer Commands): Likewise.
(GDB/MI Target Manipulation): Likewise.
(GDB/MI Miscellaneous Commands): Likewise.

[-- Attachment #2: gdb-mi-remove-unimplemented-20090627-2.txt --]
[-- Type: text/plain, Size: 8893 bytes --]

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 28 Jun 2009 03:56:24 -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.601
diff -u -p -u -r1.601 gdb.texinfo
--- doc/gdb.texinfo 28 Jun 2009 00:20:23 -0000 1.601
+++ doc/gdb.texinfo 28 Jun 2009 03:56:25 -0000
@@ -21943,6 +21943,7 @@ The corresponding @value{GDBN} command i
@end smallexample

+@ignore
@subheading The @code{-exec-show-arguments} Command
@findex -exec-show-arguments

@@ -21960,6 +21961,7 @@ The corresponding @value{GDBN} command i

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-environment-cd} Command
@@ -24160,6 +24162,7 @@ The tracepoint commands are not yet impl
@section @sc{gdb/mi} Symbol Query Commands

+@ignore
@subheading The @code{-symbol-info-address} Command
@findex -symbol-info-address

@@ -24275,6 +24278,7 @@ List the functions in the executable.

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-symbol-list-lines} Command
@@ -24303,6 +24307,7 @@ There is no corresponding @value{GDBN} c
@end smallexample

+@ignore
@subheading The @code{-symbol-list-types} Command
@findex -symbol-list-types

@@ -24377,6 +24382,7 @@ The corresponding @value{GDBN} command i

@subsubheading Example
N.A.
+@end ignore

@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -24445,6 +24451,7 @@ The corresponding @value{GDBN} command i
@end smallexample

+@ignore
@subheading The @code{-file-list-exec-sections} Command
@findex -file-list-exec-sections

@@ -24464,6 +24471,7 @@ information as this command. @code{gdbt

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-file-list-exec-source-file} Command
@@ -24524,6 +24532,7 @@ The @value{GDBN} equivalent is @samp{inf
(gdb)
@end smallexample

+@ignore
@subheading The @code{-file-list-shared-libraries} Command
@findex -file-list-shared-libraries

@@ -24560,6 +24569,7 @@ The corresponding @value{GDBN} command i

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-file-symbol-file} Command
@@ -24656,6 +24666,7 @@ The corresponding @value{GDBN} command i
(gdb)
@end smallexample

+@ignore
@subheading The @code{-target-compare-sections} Command
@findex -target-compare-sections

@@ -24674,6 +24685,7 @@ The @value{GDBN} equivalent is @samp{com

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-target-detach} Command
@@ -24833,6 +24845,7 @@ write-rate="429"
@end smallexample

+@ignore
@subheading The @code{-target-exec-status} Command
@findex -target-exec-status

@@ -24902,6 +24915,7 @@ N.A.
@end smallexample

@c ????
+@end ignore

@subsubheading @value{GDBN} Command

@@ -25063,6 +25077,7 @@ Approximately corresponds to @samp{quit}
@end smallexample

+@ignore
@subheading The @code{-exec-abort} Command
@findex -exec-abort

@@ -25080,6 +25095,7 @@ The corresponding @value{GDBN} command i

@subsubheading Example
N.A.
+@end ignore

@subheading The @code{-gdb-set} Command