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

* Re: [RFA] New solib function: discard all solib symbols.
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2001-04-17 14:15 UTC (permalink / raw)
  To: Michael Snyder, gdb-patches

On Apr 17,  1:49pm, Michael Snyder wrote:

> 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.

This looks fine to me with the exception of the following bit...

> +   add_com ("nosharedlibrary", class_files, no_shared_libraries,
> + 	   "Unload all shared object library symbols except .");

I don't understand the "except ." part.


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

* Re: [RFA] New solib function: discard all solib symbols.
  2001-04-17 14:15 ` Kevin Buettner
@ 2001-04-17 14:35   ` Michael Snyder
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2001-04-17 14:35 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Kevin Buettner wrote:
> 
> On Apr 17,  1:49pm, Michael Snyder wrote:
> 
> > 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.
> 
> This looks fine to me with the exception of the following bit...
> 
> > +   add_com ("nosharedlibrary", class_files, no_shared_libraries,
> > +        "Unload all shared object library symbols except .");
> 
> I don't understand the "except ." part.

Oops.  Sorry, meant to take that out.
I'll check it in after cleanup.


^ 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