Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] New solib function: discard all solib symbols.
@ 2001-04-17 14:00 Michael Snyder
  2001-04-17 14:15 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2001-04-17 14:00 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb

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  <msnyder@redhat.com>

	* 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,



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-17 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 14:00 [RFA] New solib function: discard all solib symbols Michael Snyder
2001-04-17 14:15 ` Kevin Buettner
2001-04-17 14:35   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox