This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] set print symbol-loading on|off
[apologies, resending 'cus gmail sent mime and the ml doesn't like mime]
On Sat, Jul 19, 2008 at 3:37 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Thu, 10 Jul 2008 13:37:01 -0700 (PDT)
> > From: dje@google.com (Doug Evans)
> >
> > Along the lines of "set print thread-events on|off",
> > this option lets one turn off symbol loading messages.
> > If the app has *lots* of shared libraries, these messages
> > can be more noise than signal.
>
> Thanks.
>
> > --- NEWS 10 Jul 2008 16:44:47 -0000 1.280
> > +++ NEWS 10 Jul 2008 20:16:31 -0000
> > @@ -68,6 +68,10 @@ find [/size-char] [/max-count] start-add
> > val1 [, val2, ...]
> > Search memory for a sequence of bytes.
> >
> > +set print symbol-loading
> > +show print symbol-loading
> > + Control printing of symbol loading messages.
>
> This is okay.
>
> > - printf_unfiltered (_("Reading symbols from %s..."), name);
> > - wrap_here ("");
> > - gdb_flush (gdb_stdout);
> > + if (print_symbol_loading)
> > + {
> > + printf_unfiltered (_("Reading symbols from %s..."), name);
> > + wrap_here ("");
> > + gdb_flush (gdb_stdout);
> > + }
>
> I'm not sure doing this in complete silence is a good idea. You've
> shut up GDB, but this phase could take a long time, during which GDB
> will appear to be hung. How about printing a single message, like
> "Reading symbols ..."?
Any ideas where such a message should be printed? I'm guessing you'd
want it printed in all the user-commands that might call this
lowish-level routine, but that's just a guess.
>
> > + add_setshow_boolean_cmd ("symbol-loading", no_class,
> > + &print_symbol_loading, _("\
> > +Set printing of symbol loading messages."), _("\
> > +Show printing of symbol loading messages."), NULL,
>
> This is not enough detail. As written, this doc string doesn't really
> document anything in a useful manner. Please add an explanation of
> what this does, e.g. "When ON (the default), GDB will print messages
> about loading symbols from shared libraries and debug info files."
Monkey-see monkey-do hacking from the "set print thread-events" patch.
Any suggestions if/how that needs to be enhanced as well?
thread.c:
add_setshow_boolean_cmd ("thread-events", no_class,
&print_thread_events, _("\
Set printing of thread events (such as thread start and exit)."), _("\
Show printing of thread events (such as thread start and exit)."), NULL,
NULL,
show_print_thread_events,
&setprintlist, &showprintlist);
>
> > Index: doc/gdb.texinfo
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
>
> This part is okay. Thanks.