aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-03-31 12:07:48 -0700
committerDoug Evans <dje@google.com>2014-03-31 12:07:48 -0700
commit770e7fc78c3c94195cacf2d7698a252d410886a1 (patch)
tree665ce89a8c46f3a619e945f5c90cdffe21157aea /gdb/solib.c
parent76f0cad6f4e0fdfc4cfeee135b44b6a090919c60 (diff)
downloadgdb-770e7fc78c3c94195cacf2d7698a252d410886a1.zip
gdb-770e7fc78c3c94195cacf2d7698a252d410886a1.tar.gz
gdb-770e7fc78c3c94195cacf2d7698a252d410886a1.tar.bz2
New option "set print symbol-loading".
* NEWS: Mention it. * solib.c (solib_read_symbols): Only print symbol loading messages if requested. (solib_add): If symbol loading is in "brief" mode, notify user symbols are being loaded. (reload_shared_libraries_1): Ditto. * symfile.c (print_symbol_loading_off): New static global. (print_symbol_loading_brief): New static global. (print_symbol_loading_full): New static global. (print_symbol_loading_enums): New static global. (print_symbol_loading): New static global. (print_symbol_loading_p): New function. (symbol_file_add_with_addrs): Only print symbol loading messages if requested. (_initialize_symfile): Register "print symbol-loading" set/show command. * symfile.h (print_symbol_loading_p): Declare. doc/ * gdb.texinfo (Symbols): Document set/show print symbol-loading. testsuite/ * gdb.base/print-symbol-loading-lib.c: New file. * gdb.base/print-symbol-loading-main.c: New file. * gdb.base/print-symbol-loading.exp: New file.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 3350bfd..e0afca0 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -650,7 +650,7 @@ solib_read_symbols (struct so_list *so, int flags)
so->so_name);
else
{
- if (from_tty || info_verbose)
+ if (print_symbol_loading_p (from_tty, 0, 1))
printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name);
so->symbols_loaded = 1;
}
@@ -905,6 +905,17 @@ solib_add (char *pattern, int from_tty,
{
struct so_list *gdb;
+ if (print_symbol_loading_p (from_tty, 0, 0))
+ {
+ if (pattern != NULL)
+ {
+ printf_unfiltered (_("Loading symbols for shared libraries: %s\n"),
+ pattern);
+ }
+ else
+ printf_unfiltered (_("Loading symbols for shared libraries.\n"));
+ }
+
current_program_space->solib_add_generation++;
if (pattern)
@@ -1277,6 +1288,9 @@ reload_shared_libraries_1 (int from_tty)
struct so_list *so;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ if (print_symbol_loading_p (from_tty, 0, 0))
+ printf_unfiltered (_("Loading symbols for shared libraries.\n"));
+
for (so = so_list_head; so != NULL; so = so->next)
{
char *filename, *found_pathname = NULL;