This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Typos in gdb/mi
- From: Andreas From <andreas dot from at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 18 Aug 2014 10:48:58 +0200
- Subject: [PATCH] Typos in gdb/mi
- Authentication-results: sourceware.org; auth=none
Hi,
This is a first patch for setting up the account.
I fixed miscellaneous typos and capitalization for "gdb", "gcc", "mi"
and "cli" and replaced "var obj" -> "varobj" in code comments in MI parts.
I de-capitalized VAROBJ in one comment since it is not a variable but
the type referred to.
Would this be OK to commit? And, if so, can someone help me further with
access for pushing?
Regards,
Andreas
gdb/mi/
2014-08-18 Andreas From <andreas.from@ericsson.com>
* mi-cmd-disas.c: Typo fixes.
* mi-cmd-env.c: Likewise.
* mi-cmd-stack.c: Likewise.
* mi-cmd-var.c: Likewise.
* mi-cmds.c: Likewise.
* mi-common.h: Likewise.
* mi-getopt.h: Likewise.
* mi-interp.c: Likewise.
* mi-main.c: Likewise.
---
gdb/mi/mi-cmd-disas.c | 2 +-
gdb/mi/mi-cmd-env.c | 8 ++++----
gdb/mi/mi-cmd-stack.c | 2 +-
gdb/mi/mi-cmd-var.c | 26 +++++++++++++-------------
gdb/mi/mi-cmds.c | 4 ++--
gdb/mi/mi-common.h | 4 ++--
gdb/mi/mi-getopt.h | 2 +-
gdb/mi/mi-interp.c | 12 ++++++------
gdb/mi/mi-main.c | 32 ++++++++++++++++----------------
9 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index f56daa5..a39a787 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -36,7 +36,7 @@
FILENAME: The name of the file where we want disassemble from.
LINE: The line around which we want to disassemble. It will
- disassemble the function that contins that line.
+ disassemble the function that contains that line.
HOW_MANY: Number of disassembly lines to display. With source, it
is the number of disassembly lines only, not counting the source
lines.
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index 8c9d170..66c2c48 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -40,7 +40,7 @@ static const char path_var_name[] = "PATH";
static char *orig_path = NULL;
/* The following is copied from mi-main.c so for m1 and below we can
- perform old behavior and use cli commands. If ARGS is non-null,
+ perform old behavior and use CLI commands. If ARGS is non-null,
append it to the CMD. */
static void
@@ -78,7 +78,7 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
return;
}
- /* Otherwise the mi level is 2 or higher. */
+ /* Otherwise the MI level is 2 or higher. */
if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
error (_("-environment-pwd: error finding name of working
directory: %s"),
@@ -140,7 +140,7 @@ mi_cmd_env_path (char *command, char **argv, int argc)
return;
}
- /* Otherwise the mi level is 2 or higher. */
+ /* Otherwise the MI level is 2 or higher. */
while (1)
{
int opt = mi_getopt ("-environment-path", argc, argv, opts,
@@ -213,7 +213,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
return;
}
- /* Otherwise mi level is 2 or higher. */
+ /* Otherwise MI level is 2 or higher. */
while (1)
{
int opt = mi_getopt ("-environment-directory", argc, argv, opts,
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 608dc4e..c491d88 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -600,7 +600,7 @@ list_args_or_locals (enum what_to_list what, enum
print_valu
case LOC_TYPEDEF: /* local typedef */
case LOC_LABEL: /* local label */
case LOC_BLOCK: /* local function */
- case LOC_CONST_BYTES: /* loc. byte seq. */
+ case LOC_CONST_BYTES: /* local byte sequence */
case LOC_UNRESOLVED: /* unresolved static */
case LOC_OPTIMIZED_OUT: /* optimized out */
print_me = 0;
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index f2ca326..52daa19 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -245,7 +245,7 @@ mi_cmd_var_set_format (char *command, char **argv,
int argc)
if (argc != 2)
error (_("-var-set-format: Usage: NAME FORMAT."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
format = mi_parse_format (argv[1]);
@@ -313,7 +313,7 @@ mi_cmd_var_show_format (char *command, char **argv,
int argc
if (argc != 1)
error (_("-var-show-format: Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
format = varobj_get_display_format (var);
@@ -331,7 +331,7 @@ mi_cmd_var_info_num_children (char *command, char
**argv, in
if (argc != 1)
error (_("-var-info-num-children: Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
ui_out_field_int (uiout, "numchild", varobj_get_num_children (var));
@@ -385,7 +385,7 @@ mi_cmd_var_list_children (char *command, char
**argv, int ar
error (_("-var-list-children: Usage: "
"[PRINT_VALUES] NAME [FROM TO]"));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
if (argc == 1 || argc == 3)
var = varobj_get_handle (argv[0]);
else
@@ -451,7 +451,7 @@ mi_cmd_var_info_type (char *command, char **argv,
int argc)
if (argc != 1)
error (_("-var-info-type: Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
ui_out_field_string (uiout, "type", varobj_get_type (var));
@@ -467,7 +467,7 @@ mi_cmd_var_info_path_expression (char *command, char
**argv,
if (argc != 1)
error (_("Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
path_expr = varobj_get_path_expr (var);
@@ -485,7 +485,7 @@ mi_cmd_var_info_expression (char *command, char
**argv, int
if (argc != 1)
error (_("-var-info-expression: Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
lang = varobj_get_language (var);
@@ -505,7 +505,7 @@ mi_cmd_var_show_attributes (char *command, char
**argv, int
if (argc != 1)
error (_("-var-show-attributes: Usage: NAME."));
- /* Get varobj handle, if a valid var obj name was specified */
+ /* Get varobj handle, if a valid varobj name was specified */
var = varobj_get_handle (argv[0]);
attr = varobj_get_attributes (var);
@@ -568,7 +568,7 @@ mi_cmd_var_evaluate_expression (char *command, char
**argv,
if (oind < argc - 1)
error (_("Garbage at end of command"));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[oind]);
if (formatFound)
@@ -598,7 +598,7 @@ mi_cmd_var_assign (char *command, char **argv, int argc)
if (argc != 2)
error (_("-var-assign: Usage: NAME EXPRESSION."));
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
var = varobj_get_handle (argv[0]);
if (!varobj_editable_p (var))
@@ -697,14 +697,14 @@ mi_cmd_var_update (char *command, char **argv, int
argc)
data.print_values = print_values;
/* varobj_update_one automatically updates all the children of
- VAROBJ. Therefore update each VAROBJ only once by iterating
- only the root VAROBJs. */
+ varobj. Therefore update each varobj only once by iterating
+ only the root varobjs. */
all_root_varobjs (mi_cmd_var_update_iter, &data);
}
else
{
- /* Get varobj handle, if a valid var obj name was specified. */
+ /* Get varobj handle, if a valid varobj name was specified. */
struct varobj *var = varobj_get_handle (name);
varobj_update_one (var, print_values, 1 /* explicit */);
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index ded36bf..fd10eec 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -179,11 +179,11 @@ static struct mi_cmd mi_cmds[] =
{ NULL, }
};
-/* Pointer to the mi command table (built at run time). */
+/* Pointer to the MI command table (built at run time). */
static struct mi_cmd **mi_table;
-/* A prime large enough to accomodate the entire command table. */
+/* A prime large enough to accommodate the entire command table. */
enum
{
MI_TABLE_SIZE = 227
diff --git a/gdb/mi/mi-common.h b/gdb/mi/mi-common.h
index 71e5d78..8ae8bc9 100644
--- a/gdb/mi/mi-common.h
+++ b/gdb/mi/mi-common.h
@@ -20,7 +20,7 @@
#define MI_COMMON_H
/* Represents the reason why GDB is sending an asynchronous command to
- the front end. NOTE: When modifing this, don't forget to update
+ the front end. NOTE: When modifying this, don't forget to update
gdb.texinfo! */
enum async_reply_reason
{
@@ -63,7 +63,7 @@ struct mi_interp
/* MI's CLI builder (wraps OUT). */
struct ui_out *cli_uiout;
- /* This is the interpreter for the mi... */
+ /* This is the interpreter for the MI... */
struct interp *mi2_interp;
struct interp *mi1_interp;
struct interp *mi_interp;
diff --git a/gdb/mi/mi-getopt.h b/gdb/mi/mi-getopt.h
index 6fe6df0..2e0eca1 100644
--- a/gdb/mi/mi-getopt.h
+++ b/gdb/mi/mi-getopt.h
@@ -58,7 +58,7 @@ extern int mi_getopt_allow_unknown (const char
*prefix, int ar
/* mi_valid_noargs determines if ARGC/ARGV are a valid set of
parameters to satisfy an MI function that is not supposed to
- recieve any arguments.
+ receive any arguments.
An MI function that should not receive arguments can still be
passed parameters after the special option '--' such as below.
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 3827830..dab931b 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -186,7 +186,7 @@ mi_interpreter_resume (void *data)
async_command_editing_p = 0;
/* FIXME: This is a total hack for now. PB's use of the MI
implicitly relies on a bug in the async support which allows
- asynchronous commands to leak through the commmand loop. The bug
+ asynchronous commands to leak through the command loop. The bug
involves (but is not limited to) the fact that sync_execution was
erroneously initialized to 0. Duplicate by initializing it thus
here... */
@@ -277,7 +277,7 @@ mi_cmd_interpreter_exec (char *command, char **argv,
int arg
/* This inserts a number of hooks that are meant to produce
async-notify ("=") MI messages while running commands in another
interpreter using mi_interpreter_exec. The canonical use for this
- is to allow access to the gdb CLI interpreter from within the MI,
+ is to allow access to the GDB CLI interpreter from within the MI,
while still producing MI style output when actions in the CLI
command change GDB's state. */
@@ -316,7 +316,7 @@ mi_on_sync_execution_done (void)
will print the prompt right after printing "^running", even if we
cannot actually accept any input until the target stops. See
mi_on_resume. However, if the target is async but MI is sync,
- then we need to output the MI prompt now, to replicate gdb's
+ then we need to output the MI prompt now, to replicate GDB's
behavior when neither the target nor MI are async. (Note this
observer is only called by the asynchronous target event handling
code.) */
@@ -588,7 +588,7 @@ static void
mi_on_normal_stop (struct bpstats *bs, int print_frame)
{
/* Since this can be called when CLI command is executing,
- using cli interpreter, be sure to use MI uiout for output,
+ using CLI interpreter, be sure to use MI uiout for output,
not the current one. */
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
@@ -965,7 +965,7 @@ mi_on_resume (ptid_t ptid)
if (!running_result_record_printed && mi_proceeded)
{
running_result_record_printed = 1;
- /* This is what gdb used to do historically -- printing prompt
even if
+ /* This is what GDB used to do historically -- printing prompt
even if
it cannot actually accept any input. This will be surely removed
for MI3, and may be removed even earlier. SYNC_EXECUTION is
checked here because we only need to emit a prompt if a
@@ -1124,7 +1124,7 @@ mi_ui_out (struct interp *interp)
static struct ui_file *saved_raw_stdout;
-/* Do MI-specific logging actions; save raw_stdout, and change all
+/* Do MI specific logging actions; save raw_stdout, and change all
the consoles to use the supplied ui-file(s). */
static int
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 59717ca..8bdcba0 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -169,7 +169,7 @@ mi_cmd_gdb_exit (char *command, char **argv, int argc)
void
mi_cmd_exec_next (char *command, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
if (argc > 0 && strcmp(argv[0], "--reverse") == 0)
mi_execute_async_cli_command ("reverse-next", argv + 1, argc - 1);
else
@@ -179,7 +179,7 @@ mi_cmd_exec_next (char *command, char **argv, int argc)
void
mi_cmd_exec_next_instruction (char *command, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
if (argc > 0 && strcmp(argv[0], "--reverse") == 0)
mi_execute_async_cli_command ("reverse-nexti", argv + 1, argc - 1);
else
@@ -189,7 +189,7 @@ mi_cmd_exec_next_instruction (char *command, char
**argv, in
void
mi_cmd_exec_step (char *command, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
if (argc > 0 && strcmp(argv[0], "--reverse") == 0)
mi_execute_async_cli_command ("reverse-step", argv + 1, argc - 1);
else
@@ -199,7 +199,7 @@ mi_cmd_exec_step (char *command, char **argv, int argc)
void
mi_cmd_exec_step_instruction (char *command, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
if (argc > 0 && strcmp(argv[0], "--reverse") == 0)
mi_execute_async_cli_command ("reverse-stepi", argv + 1, argc - 1);
else
@@ -209,7 +209,7 @@ mi_cmd_exec_step_instruction (char *command, char
**argv, in
void
mi_cmd_exec_finish (char *command, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
if (argc > 0 && strcmp(argv[0], "--reverse") == 0)
mi_execute_async_cli_command ("reverse-finish", argv + 1, argc - 1);
else
@@ -238,7 +238,7 @@ mi_cmd_exec_return (char *command, char **argv, int
argc)
void
mi_cmd_exec_jump (char *args, char **argv, int argc)
{
- /* FIXME: Should call a libgdb function, not a cli wrapper. */
+ /* FIXME: Should call a libgdb function, not a CLI wrapper. */
mi_execute_async_cli_command ("jump", argv, argc);
}
@@ -773,7 +773,7 @@ list_available_thread_groups (VEC (int) *ids, int
recurse)
/* This keeps a map from integer (pid) to VEC (struct osdata_item *)*
The vector contains information about all threads for the given pid.
This is assigned an initial value to avoid "may be used
uninitialized"
- warning from gcc. */
+ warning from GCC. */
splay_tree tree = NULL;
/* get_osdata will throw if it cannot return data. */
@@ -1381,12 +1381,12 @@ mi_cmd_data_evaluate_expression (char *command,
char **a
the ``x'' command.
WORD-SIZE: size of each ``word''; 1,2,4, or 8 bytes.
NR_ROW: Number of rows.
- NR_COL: The number of colums (words per row).
+ NR_COL: The number of columns (words per row).
ASCHAR: (OPTIONAL) Append an ascii character dump to each row. Use
ASCHAR for unprintable characters.
Reads SIZE*NR_ROW*NR_COL bytes starting at ADDR from memory and
- displayes them. Returns:
+ displays them. Returns:
{addr="...",rowN={wordN="..." ,... [,ascii="..."]}, ...}
@@ -1483,7 +1483,7 @@ mi_cmd_data_read_memory (char *command, char
**argv, int a
if (nr_cols <= 0)
error (_("-data-read-memory: invalid number of columns."));
- /* The un-printable character when printing ascii. */
+ /* The non-printable character when printing ascii. */
if (argc == 6)
aschar = *argv[5];
else
@@ -1513,7 +1513,7 @@ mi_cmd_data_read_memory (char *command, char
**argv, int a
ui_out_field_core_addr (uiout, "next-page", gdbarch, addr +
total_bytes);
ui_out_field_core_addr (uiout, "prev-page", gdbarch, addr -
total_bytes);
- /* Build the result as a two dimentional table. */
+ /* Build the result as a two dimensional table. */
{
struct ui_file *stream;
struct cleanup *cleanup_stream;
@@ -1959,7 +1959,7 @@ mi_cmd_remove_inferior (char *command, char
**argv, int ar
Return <0 for error; >=0 for ok.
args->action will tell mi_execute_command what action
- to perfrom after the given command has executed (display/suppress
+ to perform after the given command has executed (display/suppress
prompt, display error). */
static void
@@ -2017,7 +2017,7 @@ captured_mi_execute_command (struct ui_out *uiout,
struct
/* A CLI command was read from the input stream. */
/* This "feature" will be removed as soon as we have a
- complete set of mi commands. */
+ complete set of MI commands. */
/* Echo the command on the console. */
fprintf_unfiltered (gdb_stdlog, "%s\n", context->command);
/* Call the "console" interpreter. */
@@ -2050,7 +2050,7 @@ captured_mi_execute_command (struct ui_out *uiout,
struct
do_cleanups (cleanup);
}
-/* Print a gdb exception to the MI output stream. */
+/* Print a GDB exception to the MI output stream. */
static void
mi_print_exception (const char *token, struct gdb_exception exception)
@@ -2080,7 +2080,7 @@ mi_execute_command (const char *cmd, int from_tty)
struct mi_parse *command = NULL;
volatile struct gdb_exception exception;
- /* This is to handle EOF (^D). We just quit gdb. */
+ /* This is to handle EOF (^D). We just quit GDB. */
/* FIXME: we should call some API function here. */
if (cmd == 0)
quit_force (NULL, from_tty);
@@ -2254,7 +2254,7 @@ mi_cmd_execute (struct mi_parse *parse)
else if (parse->cmd->cli.cmd != 0)
{
/* FIXME: DELETE THIS. */
- /* The operation is still implemented by a cli command. */
+ /* The operation is still implemented by a CLI command. */
/* Must be a synchronous one. */
mi_execute_cli_command (parse->cmd->cli.cmd, parse->cmd->cli.args_p,
parse->args);