From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: gdb-patches@sources.redhat.com Cc: kevinb@redhat.com Subject: [RFA] New solib function: discard all solib symbols. Date: Tue, 17 Apr 2001 14:00:00 -0000 Message-id: <3ADCAC58.39B9F204@cygnus.com> X-SW-Source: 2001-04/msg00177.html The purpose of this function is actually for handling shared libs on remote targets, but I figured it might be useful as a user command (complementary to the "sharedlib" command which loads all solib symbols). 2001-04-17 Michael Snyder * solib.c (no_shared_libraries): New function. Discard all symbols from shared libraries. (_initialize_solib): Add command "nosharedlibrary" as complement to the command "sharedlibrary". Unloads symbols for all solibs. Index: solib.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/solib.c,v retrieving revision 1.166 diff -c -3 -p -r1.166 solib.c *** solib.c 2001/03/26 19:54:37 1.166 --- solib.c 2001/04/17 20:45:01 *************** sharedlibrary_command (char *args, int f *** 809,814 **** --- 809,820 ---- solib_add (args, from_tty, (struct target_ops *) 0); } + void + no_shared_libraries (char *ignored, int from_tty) + { + objfile_purge_solibs (); + do_clear_solib (NULL); + } void _initialize_solib (void) *************** _initialize_solib (void) *** 819,824 **** --- 825,832 ---- "Load shared object library symbols for files matching REGEXP."); add_info ("sharedlibrary", info_sharedlibrary_command, "Status of loaded shared object libraries."); + add_com ("nosharedlibrary", class_files, no_shared_libraries, + "Unload all shared object library symbols except ."); add_show_from_set (add_set_cmd ("auto-solib-add", class_support, var_zinteger,