This is the mail archive of the
mailing list for the GDB project.
Re: [patch 04/15] PIE: Add from_tty to solib_create_inferior_hook
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 10 Nov 2009 11:00:51 -0700
- Subject: Re: [patch 04/15] PIE: Add from_tty to solib_create_inferior_hook
- References: <20091109205819.GE19138@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <email@example.com> writes:
Jan> If we would call first solib_create_inferior_hook() it calls
Jan> solib_add(0) so that loading of the libraries is not shown to the
Jan> user. If we would call solib_add(from_tty) later again it would
Jan> Symbols already loaded for ...
Jan> One question is whether we are interested in these progress
Jan> messages at all so that just no from_tty would be needed and no
Jan> progress messages would ever be printed. I suggest such way but
Jan> kept this patch printing it just targeting the requirements for PIE
I'm ambivalent about the messages, but FWIW I think you did the right
here: it is simpler to approve a patch that doesn't change messages than
it is to approve one that does.
Jan> Another question is why from_tty cannot be a global variable (or a
Jan> global getter) as it is more global than for example
I'd prefer we not introduce new globals unless truly necessary.
A from_tty global would be fine for things strictly related to the CLI,
I suppose (the difficulty being enforcing such a rule), but for the core
I think parameterization is better.
Jan> SOLIB_CREATE_INFERIOR_HOOK was not modified as its only called
Jan> xcoff_relocate_symtab has no use for FROM_TTY.
It would be nice to nuke SOLIB_CREATE_INFERIOR_HOOK, given that there is
just a single definition.
Jan> * infcmd.c (post_create_inferior): Move solib_add after
Jan> solib_create_inferior_hook. Pass from_tty to
Jan> solib_create_inferior_hook. Call solib_add and SOLIB_ADD with
Jan> 0 from_tty and comment why.