+ for (gdb = so_list_head; gdb; gdb = gdb->next)
+ if (! pattern || re_exec (gdb->so_name))
+ {
+ any_matches = 1;
+
+ if (gdb->symbols_loaded)
+ {
+ if (from_tty)
+ printf_unfiltered ("Symbols already loaded for %s\n",
+ gdb->so_name);
+ }
+ else
+ {
+ if (catch_errors
+ (symbol_add_stub, gdb,
+ "Error while reading shared library symbols:\n",
+ RETURN_MASK_ALL))
+ {
+ if (from_tty)
+ printf_unfiltered ("Loaded symbols for %s\n",
+ gdb->so_name);
+ gdb->symbols_loaded = 1;
+ loaded_any_symbols = 1;
+ }
+ }
+ }
+
+ if (from_tty && pattern && ! any_matches)
+ printf_unfiltered
+ ("No loaded shared libraries match the pattern `%s'.\n", pattern);
+
+ if (loaded_any_symbols)
+ {
+ /* Getting new symbols may change our opinion about what is
+ frameless. */
+ reinit_frame_cache ();
+
+ special_symbol_handling ();
+ }
+ }