diff options
author | Doug Evans <dje@google.com> | 2013-08-26 18:41:31 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-08-26 18:41:31 +0000 |
commit | 52e260a34ef6e013980890bee0d5435cfc14e9c4 (patch) | |
tree | a9fcdfe86a13922d91ea87f0b2ecdae9bf96d140 /gdb/symmisc.c | |
parent | 260b681b41cf3953ac2a2e5e3e6a4f690a75064d (diff) | |
download | gdb-52e260a34ef6e013980890bee0d5435cfc14e9c4.zip gdb-52e260a34ef6e013980890bee0d5435cfc14e9c4.tar.gz gdb-52e260a34ef6e013980890bee0d5435cfc14e9c4.tar.bz2 |
* 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".
doc/
* gdb.texinfo (Maintenance Commands): "maint print objfiles" now takes
an optional regexp.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index fb0d336..842c16f 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -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, _("\ |