aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-file.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2012-03-06 22:48:53 +0000
committerStan Shebs <shebs@codesourcery.com>2012-03-06 22:48:53 +0000
commit2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0 (patch)
tree132fc8ce2c9fd9b998bc772902d0368cd81d8193 /gdb/mi/mi-cmd-file.c
parent3ce231f8e2a12502728fbebf0ddfaa690e986154 (diff)
downloadgdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.zip
gdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.tar.gz
gdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.tar.bz2
* mi/mi-cmd-break.c: Enforce coding standards, fix comments.
* mi/mi-cmd-disas.c: Ditto. * mi/mi-cmd-env.c: Ditto. * mi/mi-cmd-file.c: Ditto. * mi/mi-cmd-stack.c: Ditto. * mi/mi-cmd-target.c: Ditto. * mi/mi-cmd-var.c: Ditto. * mi/mi-cmds.c: Ditto. * mi/mi-cmds.h: Ditto. * mi/mi-console.c: Ditto. * mi/mi-getopt.c: Ditto. * mi/mi-getopt.h: Ditto. * mi/mi-interp.c: Ditto. * mi/mi-main.c: Ditto. * mi/mi-out.c: Ditto. * mi/mi-parse.c: Ditto. * mi/mi-parse.h: Ditto. * mi/mi-symbol-cmds.c: Ditto. * mi/mi-getopt.h: Move mi_opt struct up. * mi/mi-main.c (captured_mi_execute_command): Remove redundant return. * mi/mi-out.c (_initialize_mi_out): Remove empty initialize.
Diffstat (limited to 'gdb/mi/mi-cmd-file.c')
-rw-r--r--gdb/mi/mi-cmd-file.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
index c4d1461..0b2b725 100644
--- a/gdb/mi/mi-cmd-file.c
+++ b/gdb/mi/mi-cmd-file.c
@@ -1,4 +1,4 @@
-/* MI Command Set - breakpoint and watchpoint commands.
+/* MI Command Set - file commands.
Copyright (C) 2000-2002, 2007-2012 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
@@ -27,7 +27,7 @@
#include "psymtab.h"
/* Return to the client the absolute path and line number of the
- current file being executed. */
+ current file being executed. */
void
mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
@@ -38,20 +38,20 @@ mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
if (!mi_valid_noargs ("-file-list-exec-source-file", argc, argv))
error (_("-file-list-exec-source-file: Usage: No args"));
- /* Set the default file and line, also get them */
+ /* Set the default file and line, also get them. */
set_default_source_symtab_and_line ();
st = get_current_source_symtab_and_line ();
- /* We should always get a symtab.
- Apparently, filename does not need to be tested for NULL.
- The documentation in symtab.h suggests it will always be correct */
+ /* We should always get a symtab. Apparently, filename does not
+ need to be tested for NULL. The documentation in symtab.h
+ suggests it will always be correct. */
if (!st.symtab)
error (_("-file-list-exec-source-file: No symtab"));
- /* Extract the fullname if it is not known yet */
+ /* Extract the fullname if it is not known yet. */
symtab_to_fullname (st.symtab);
- /* Print to the user the line, filename and fullname */
+ /* Print to the user the line, filename and fullname. */
ui_out_field_int (uiout, "line", st.line);
ui_out_field_string (uiout, "file", st.symtab->filename);
@@ -63,6 +63,7 @@ mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
}
/* A callback for map_partial_symbol_filenames. */
+
static void
print_partial_file_name (const char *filename, const char *fullname,
void *ignore)
@@ -89,17 +90,17 @@ mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc)
if (!mi_valid_noargs ("-file-list-exec-source-files", argc, argv))
error (_("-file-list-exec-source-files: Usage: No args"));
- /* Print the table header */
+ /* Print the table header. */
ui_out_begin (uiout, ui_out_type_list, "files");
- /* Look at all of the symtabs */
+ /* Look at all of the symtabs. */
ALL_SYMTABS (objfile, s)
{
ui_out_begin (uiout, ui_out_type_tuple, NULL);
ui_out_field_string (uiout, "file", s->filename);
- /* Extract the fullname if it is not known yet */
+ /* Extract the fullname if it is not known yet. */
symtab_to_fullname (s);
if (s->fullname)