This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A revised patch for dlclose


On Tue, Mar 07, 2000 at 08:31:41PM -0800, Jim Kingdon wrote:
> 
> For example, I've been thinking of splitting find_solib into two
> functions.  One (to be called find_solib) which just traverses the
> linked list in GDB and the other (to be called solib_recheck) which
> looks at the inferior and updates GDB's linked list.

I am looking at the code. We can tell when a DSO is unloaded. The
problem is how we update so_list_head and the loaded symbols. It
looks very messy to me. I don't know how hard to release only one
DSO and all memeries it uses.

BTW, I think I can modify my patch to do the massive work only when
a DSO is unloaded if that helps:

	static int solib_unloading = 0;
	...
	if (debug_copy.r_state == RT_DELETE)
	  solib_unloading = 1;
	else if (solib_unloading && debug_copy.r_state == RT_CONSISTENT)
	  {
	    ...
	    Clear DSO list.
	    Unload symbols.
	    ...
	    solib_unloading = 0;
	  }

H.J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]