From 34c41c681f4a0a0dfe0405c7d2aecf458520557a Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 19 Dec 2016 08:33:46 -0800 Subject: New syntax for mt print symbols,msymbols,psymbols. gdb/ChangeLog: * NEWS: Document new syntax for "mt print symbols", "mt print psymbols" and "mt print msymbols" commands. * psymtab.c (DEV_TTY): Delete. (dump_psymtab_addrmap): Don't dump if psymtabs_addrmap is NULL. (maintenance_print_psymbols): Rewrite for new syntax: mt print psymbols [-objfile objfile] [-pc address] [outfile] mt print psymbols [-objfile objfile] [-source source] [outfile] (_initialize_psymtab): Update help text. * symmisc.c (maintenance_print_symbols): Rewrite for new syntax: mt print symbols [-pc address] [outfile] mt print symbols [-objfile objfile] [-source source] [outfile] (maintenance_print_msymbols): Rewrite for new syntax: mt print msymbols [-objfile objfile] [outfile] Only print symbols for the current progspace. (_initialize_symmisc): Update help text. gdb/doc/ChangeLog: * gdb.texinfo (Symbols): Update docs for symbol printing maintenance commands. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Update tests for maint print symbols, psymbols and msymbols. --- gdb/doc/gdb.texinfo | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'gdb/doc/gdb.texinfo') diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a0de7d1..8e29eca 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -17243,21 +17243,32 @@ entered from the keyboard causes symbol information to be loaded. @cindex partial symbol dump @kindex maint print msymbols @cindex minimal symbol dump -@item maint print symbols @var{filename} -@itemx maint print psymbols @var{filename} -@itemx maint print msymbols @var{filename} -Write a dump of debugging symbol data into the file @var{filename}. -These commands are used to debug the @value{GDBN} symbol-reading code. Only -symbols with debugging data are included. If you use @samp{maint print -symbols}, @value{GDBN} includes all the symbols for which it has already -collected full details: that is, @var{filename} reflects symbols for -only those files whose symbols @value{GDBN} has read. You can use the -command @code{info sources} to find out which files these are. If you -use @samp{maint print psymbols} instead, the dump shows information about -symbols that @value{GDBN} only knows partially---that is, symbols defined in -files that @value{GDBN} has skimmed, but not yet read completely. Finally, -@samp{maint print msymbols} dumps just the minimal symbol information -required for each object file from which @value{GDBN} has read some symbols. +@item maint print symbols @r{[}-pc @var{address}@r{]} @r{[}@var{filename}@r{]} +@itemx maint print symbols @r{[}-objfile @var{objfile}@r{]} @r{[}-source @var{source}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]} +@itemx maint print psymbols @r{[}-objfile @var{objfile}@r{]} @r{[}-pc @var{address}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]} +@itemx maint print psymbols @r{[}-objfile @var{objfile}@r{]} @r{[}-source @var{source}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]} +@itemx maint print msymbols @r{[}-objfile @var{objfile}@r{]} @r{[}--@r{]} @r{[}@var{filename}@r{]} +Write a dump of debugging symbol data into the file @var{filename} or +the terminal if @var{filename} is unspecified. +If @code{-objfile @var{objfile}} is specified, only dump symbols for +that objfile. +If @code{-pc @var{address}} is specified, only dump symbols for the file +with code at that address. Note that @var{address} may be a symbol like +@code{main}. +If @code{-source @var{source}} is specified, only dump symbols for that +source file. + +These commands are used to debug the @value{GDBN} symbol-reading code. +These commands do not modify internal @value{GDBN} state, therefore +@samp{maint print symbols} will only print symbols for already expanded symbol +tables. +You can use the command @code{info sources} to find out which files these are. +If you use @samp{maint print psymbols} instead, the dump shows information +about symbols that @value{GDBN} only knows partially---that is, symbols +defined in files that @value{GDBN} has skimmed, but not yet read completely. +Finally, @samp{maint print msymbols} just dumps ``minimal symbols'', e.g., +``ELF symbols''. + @xref{Files, ,Commands to Specify Files}, for a discussion of how @value{GDBN} reads symbols (in the description of @code{symbol-file}). -- cgit v1.1