diff options
Diffstat (limited to 'gdb/mi/mi-cmd-file.c')
-rw-r--r-- | gdb/mi/mi-cmd-file.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index d645e5a..2071b9f 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -84,7 +84,6 @@ void mi_cmd_file_list_exec_source_files (const char *command, char **argv, int argc) { struct ui_out *uiout = current_uiout; - struct objfile *objfile; if (!mi_valid_noargs ("-file-list-exec-source-files", argc, argv)) error (_("-file-list-exec-source-files: Usage: No args")); @@ -93,15 +92,21 @@ mi_cmd_file_list_exec_source_files (const char *command, char **argv, int argc) uiout->begin (ui_out_type_list, "files"); /* Look at all of the file symtabs. */ - ALL_FILETABS (objfile, cu, s) - { - uiout->begin (ui_out_type_tuple, NULL); - - uiout->field_string ("file", symtab_to_filename_for_display (s)); - uiout->field_string ("fullname", symtab_to_fullname (s)); - - uiout->end (ui_out_type_tuple); - } + for (objfile *objfile : all_objfiles (current_program_space)) + { + for (compunit_symtab *cu : objfile_compunits (objfile)) + { + for (symtab *s : compunit_filetabs (cu)) + { + uiout->begin (ui_out_type_tuple, NULL); + + uiout->field_string ("file", symtab_to_filename_for_display (s)); + uiout->field_string ("fullname", symtab_to_fullname (s)); + + uiout->end (ui_out_type_tuple); + } + } + } map_symbol_filenames (print_partial_file_name, NULL, 1 /*need_fullname*/); |