2013-08-26 Doug Evans <dje@google.com>
+ * NEWS: Document "mt print objfiles" now takes optional regexp.
+ * symmisc.c (maintenance_print_objfiles): Argument is now an optional
+ regexp of objfiles to print.
+ (_initialize_symmisc): Update doc string for "mt print objfiles".
+
* dwarf2read.c (write_psymtabs_to_index): Move error checks ahead of
missing debug info checks.
*** Changes since GDB 7.6
+* The "maintenance print objfiles" command now takes an optional regexp.
+
* The "catch syscall" command now works on arm*-linux* targets.
* Python scripting
+2013-08-26 Doug Evans <dje@google.com>
+
+ * gdb.texinfo (Maintenance Commands): "maint print objfiles" now takes
+ an optional regexp.
+
2013-08-13 Tom Tromey <tromey@redhat.com>
* gdbint.texinfo (Testsuite): Use @table, not @itemize.
@kindex maint print objfiles
@cindex info for known object files
-@item maint print objfiles
-Print a dump of all known object files. For each object file, this
-command prints its name, address in memory, and all of its psymtabs
-and symtabs.
+@item maint print objfiles @r{[}@var{regexp}@r{]}
+Print a dump of all known object files.
+If @var{regexp} is specified, only print object files whose names
+match @var{regexp}. For each object file, this command prints its name,
+address in memory, and all of its psymtabs and symtabs.
@kindex maint print section-scripts
@cindex info for known .debug_gdb_scripts-loaded scripts
}
static void
-maintenance_print_objfiles (char *ignore, int from_tty)
+maintenance_print_objfiles (char *regexp, int from_tty)
{
struct program_space *pspace;
struct objfile *objfile;
dont_repeat ();
+ if (regexp)
+ re_comp (regexp);
+
ALL_PSPACES (pspace)
ALL_PSPACE_OBJFILES (pspace, objfile)
{
QUIT;
- dump_objfile (objfile);
+ if (! regexp
+ || re_exec (objfile->name))
+ dump_objfile (objfile);
}
}
&maintenanceprintlist);
add_cmd ("objfiles", class_maintenance, maintenance_print_objfiles,
- _("Print dump of current object file definitions."),
+ _("Print dump of current object file definitions.\n\
+With an argument REGEXP, list the object files with matching names."),
&maintenanceprintlist);
add_cmd ("symtabs", class_maintenance, maintenance_info_symtabs, _("\