Re: RFA/RFC: dump symtab and psymtab lists

Jim Blandy
2003-04-08T17:52:26Z

Andrew Cagney <ac131313@redhat.com> writes:

> > This patch adds two new commands, 'maint print symtabs' and 'maint
> > print psymtabs', that print out the full and partial symtab lists.
> > You can supply a regexp to match against the (p)symtab name to just
> > list a few.
> > The existing 'maint print symbols' and 'maint print psymbols' are
> > exhaustive, which is useful sometimes, but they produce so much output
> > that they're a pain to use when you just want to see what's up with
> > the symtab and psymtab lists themselves.
> > The output includes expressions you can cut-and-paste into GDB to get
> > a pointer to a specific symtab, psymtab, etc., and it's parenthesized
> > to make the Emacs balanced motion commands work usefully. The
> > documentation includes examples.
>
> Jim,
>
> The `maint print' series of commands should all use the syntax:
>
> (gdb) maint print <component> [ <output-file> ]
>
> (things todo is check that this is consistent).

Right, but that doesn't make sense for this command. It doesn't
produce so much output that it needs to be directed to a file ---
that's the reason the existing 'maint print' commands didn't suffice,
even though they include all the info the new commands do. And the
regexp is really helpful.