* NEWS: Document "mt print objfiles" now takes optional regexp.
authorDoug Evans <dje@google.com>
Mon, 26 Aug 2013 18:41:31 +0000 (18:41 +0000)
committerDoug Evans <dje@google.com>
Mon, 26 Aug 2013 18:41:31 +0000 (18:41 +0000)
* symmisc.c (maintenance_print_objfiles): Argument is now an optional
regexp of objfiles to print.
(_initialize_symmisc): Update doc string for "mt print objfiles".

doc/
* gdb.texinfo (Maintenance Commands): "maint print objfiles" now takes
an optional regexp.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/symmisc.c

index 91dc2d4aa22be5828c404f1aec41ffa87a267dbe..c0ff6ea8e315a8f3e577f0dc3fdb291b247f3c32 100644 (file)
@@ -1,5 +1,10 @@
 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.
 
index f246ee1d062bfa381c4c8ff3cf6fa724561d28bd..75016c11125facfefd548680f2f17cd51c57ecd1 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,8 @@
 
 *** 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
index eaaccd50821c945bb37d910c9421822dd9e64b7f..61a6f4151baaf5f24242026dc3cbfbbcbda16de2 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 6d5dec4813f4833efe696d403092c47312d216c8..c88ee65a6fbf31e861a7a318a0b127d719d09a91 100644 (file)
@@ -36820,10 +36820,11 @@ This command forces @value{GDBN} to flush its internal register cache.
 
 @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
index fb0d336b3ecc2538bc0ce184f51ab02c51f94fbf..842c16f76ca9965144c410eaceb31feaa83d9847 100644 (file)
@@ -687,18 +687,23 @@ maintenance_print_msymbols (char *args, int from_tty)
 }
 
 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);
       }
 }
 
@@ -935,7 +940,8 @@ If a SOURCE file is specified, dump only that file's minimal symbols."),
           &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, _("\
This page took 0.054565 seconds and 4 git commands to generate.